diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4158a56..4dc66f0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,6 +8,8 @@ build_job: script: - sh src/script.sh + - find public -name "oisd*.txt" -type f -print0 | xargs -0 gzip -f -k -9 + - find public -name "oisd*.txt" -type f -print0 | xargs -0 brotli -f -k -9 artifacts: paths: @@ -18,8 +20,7 @@ pages: stage: deploy script: - - find . -name "oisd*.txt" -type f -print0 | xargs -0 gzip -f -k -9 - - find . -name "oisd*.txt" -type f -print0 | xargs -0 brotli -f -k -9 + - echo artifacts: paths: @@ -28,16 +29,26 @@ pages: rules: - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH -deploy_job: +cloudflare: stage: deploy before_script: - - apk update && apk add curl + - apk update && apk add curl script: - - curl -X POST -d "{}" "https://api.netlify.com/build_hooks/$NETLIFY_BUILD_HOOK" - curl -X POST "https://api.cloudflare.com/client/v4/pages/webhooks/deploy_hooks/$CLOUDFLARE_BUILD_HOOK" rules: - # Only trigger through schedule job and "Run pipeline" in the main branch - - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && ($CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web")' + - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CLOUDFLARE == "true"' + +netlify: + stage: deploy + + before_script: + - apk update && apk add curl + + script: + - curl -X POST -d "{}" "https://api.netlify.com/build_hooks/$NETLIFY_BUILD_HOOK" + + rules: + - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $NETLIFY == "true"'