2022-01-11 06:23:08 +00:00
|
|
|
image: node:lts-alpine
|
2020-10-08 03:32:47 +00:00
|
|
|
|
2022-01-11 07:11:13 +00:00
|
|
|
include:
|
|
|
|
- template: Security/Secret-Detection.gitlab-ci.yml
|
|
|
|
|
2022-01-11 07:10:55 +00:00
|
|
|
# Only run pipeline when scheduled or "Run pipeline" in the main branch
|
|
|
|
workflow:
|
|
|
|
rules:
|
|
|
|
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && ($CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web")'
|
|
|
|
|
2022-01-08 09:31:58 +00:00
|
|
|
build_job:
|
2022-01-08 09:35:30 +00:00
|
|
|
stage: build
|
2022-01-08 09:31:58 +00:00
|
|
|
|
2020-10-08 03:32:47 +00:00
|
|
|
before_script:
|
2022-01-08 09:31:58 +00:00
|
|
|
- apk update && apk add brotli curl
|
|
|
|
|
|
|
|
script:
|
2022-01-25 09:10:43 +00:00
|
|
|
- npm run build
|
2022-01-11 06:17:55 +00:00
|
|
|
- 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
|
2022-01-08 09:31:58 +00:00
|
|
|
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- tmp
|
|
|
|
- public
|
|
|
|
|
|
|
|
pages:
|
2022-01-08 09:35:30 +00:00
|
|
|
stage: deploy
|
2021-05-22 03:14:30 +00:00
|
|
|
|
2020-10-08 03:32:47 +00:00
|
|
|
script:
|
2022-01-11 06:17:55 +00:00
|
|
|
- echo
|
2020-10-08 03:32:47 +00:00
|
|
|
|
|
|
|
artifacts:
|
|
|
|
paths:
|
2022-01-08 09:31:58 +00:00
|
|
|
- public
|
2020-10-08 03:32:47 +00:00
|
|
|
|
2022-01-11 06:17:55 +00:00
|
|
|
cloudflare:
|
2022-01-08 22:33:09 +00:00
|
|
|
stage: deploy
|
|
|
|
|
|
|
|
before_script:
|
2022-01-11 06:17:55 +00:00
|
|
|
- apk update && apk add curl
|
2022-01-08 22:33:09 +00:00
|
|
|
|
|
|
|
script:
|
2022-01-08 23:27:10 +00:00
|
|
|
- curl -X POST "https://api.cloudflare.com/client/v4/pages/webhooks/deploy_hooks/$CLOUDFLARE_BUILD_HOOK"
|
2022-01-08 22:33:09 +00:00
|
|
|
|
|
|
|
rules:
|
2022-01-25 09:40:03 +00:00
|
|
|
- if: $CLOUDFLARE_BUILD_HOOK
|
2022-01-11 06:17:55 +00:00
|
|
|
|
|
|
|
netlify:
|
|
|
|
stage: deploy
|
|
|
|
|
|
|
|
before_script:
|
2022-01-11 06:23:08 +00:00
|
|
|
- npm install
|
|
|
|
- npm install netlify-cli -g
|
|
|
|
- netlify --telemetry-disable
|
2022-01-11 06:17:55 +00:00
|
|
|
|
|
|
|
script:
|
2022-01-11 06:23:08 +00:00
|
|
|
- npm run build
|
2022-01-12 06:47:21 +00:00
|
|
|
- netlify deploy --dir=public --prod
|
2022-01-11 06:17:55 +00:00
|
|
|
|
|
|
|
rules:
|
2022-01-25 09:40:03 +00:00
|
|
|
- if: $NETLIFY_SITE_ID
|