fix(ci): compress in build stage
This commit is contained in:
parent
63da61fada
commit
25b591301d
|
@ -8,6 +8,8 @@ build_job:
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- sh src/script.sh
|
- 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:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
|
@ -18,8 +20,7 @@ pages:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- find . -name "oisd*.txt" -type f -print0 | xargs -0 gzip -f -k -9
|
- echo
|
||||||
- find . -name "oisd*.txt" -type f -print0 | xargs -0 brotli -f -k -9
|
|
||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
|
@ -28,16 +29,26 @@ pages:
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||||
|
|
||||||
deploy_job:
|
cloudflare:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- apk update && apk add curl
|
- apk update && apk add curl
|
||||||
|
|
||||||
script:
|
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"
|
- curl -X POST "https://api.cloudflare.com/client/v4/pages/webhooks/deploy_hooks/$CLOUDFLARE_BUILD_HOOK"
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
# Only trigger through schedule job and "Run pipeline" in the main branch
|
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CLOUDFLARE == "true"'
|
||||||
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && ($CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web")'
|
|
||||||
|
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"'
|
||||||
|
|
Loading…
Reference in New Issue