diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 634a98e7..0515df27 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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"'