tracking-filter/.gitlab-ci.yml

47 lines
983 B
YAML
Raw Normal View History

2022-01-08 06:33:16 +00:00
image: node:lts-alpine
2020-07-19 10:31:54 +00:00
include:
- template: Security/Secret-Detection.gitlab-ci.yml
build_job:
stage: build
2020-07-19 10:31:54 +00:00
before_script:
2022-01-08 07:16:40 +00:00
- apk update && apk add brotli curl git grep
2020-07-19 10:31:54 +00:00
script:
- sh src/script.sh
- find public -type f -regex '.*\.\(txt\|conf\|tpl\|rules\)$' -exec gzip -f -k -9 {} \;
- find public -type f -regex '.*\.\(txt\|conf\|tpl\|rules\)$' -exec brotli -f -k -9 {} \;
2020-07-19 10:31:54 +00:00
artifacts:
paths:
- tmp
- public
2020-07-19 10:31:54 +00:00
pages:
stage: deploy
2020-07-19 10:31:54 +00:00
script:
- echo
2020-07-19 10:31:54 +00:00
artifacts:
paths:
- public
2020-07-19 10:31:54 +00:00
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
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:
# 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")'