From 102ffb3a0079f5f247b2320e18e221a7f32b23e3 Mon Sep 17 00:00:00 2001 From: MDLeom <2809763-curben@users.noreply.gitlab.com> Date: Sat, 8 Jan 2022 23:06:21 +0000 Subject: [PATCH] chore(ci): add netlify build book - https://docs.netlify.com/configure-builds/build-hooks/ --- .gitlab-ci.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9cf08db2..f7de98db 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,8 @@ image: alpine:latest +include: + - template: Security/Secret-Detection.gitlab-ci.yml + build_job: stage: build @@ -30,5 +33,15 @@ pages: # Only trigger when commit to main branch - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH -include: - - template: Security/Secret-Detection.gitlab-ci.yml +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")'