fix(netlify): use manual deploy

- https://docs.netlify.com/configure-builds/stop-or-activate-builds/
This commit is contained in:
MDLeom 2022-01-11 06:25:57 +00:00
parent 5ae6823a6f
commit 15006dfbb5
No known key found for this signature in database
GPG Key ID: 32D3E28E96A695E8
1 changed files with 8 additions and 5 deletions

View File

@ -1,4 +1,4 @@
image: alpine:latest
image: node:lts-alpine
include:
- template: Security/Secret-Detection.gitlab-ci.yml
@ -44,16 +44,19 @@ cloudflare:
- curl -X POST "https://api.cloudflare.com/client/v4/pages/webhooks/deploy_hooks/$CLOUDFLARE_BUILD_HOOK"
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CLOUDFLARE == "true"'
- if: '$CLOUDFLARE == "true"'
netlify:
stage: deploy
before_script:
- apk update && apk add curl
- npm install
- npm install netlify-cli -g
- netlify --telemetry-disable
script:
- curl -X POST -d "{}" "https://api.netlify.com/build_hooks/$NETLIFY_BUILD_HOOK"
- npm run build
- netlify deploy --dir=public
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $NETLIFY == "true"'
- if: '$NETLIFY == "true"'