fix(ci): compress in build stage
This commit is contained in:
parent
63da61fada
commit
25b591301d
|
@ -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"'
|
||||
|
|
Loading…
Reference in New Issue