diff --git a/.gitlab-ci.deploy.yml b/.gitlab-ci.deploy.yml new file mode 100644 index 0000000..ef726e8 --- /dev/null +++ b/.gitlab-ci.deploy.yml @@ -0,0 +1,11 @@ +stages: + - my.remarkbox.com + +my.remarkbox.com: + stage: my.remarkbox.com + tags: ["my.remarkbox.com"] + script: + # publish build to Salt Master + - sudo /opt/salt-call-state-highstate.sh + rules: + - if: '$CI_COMMIT_BRANCH == "main"' diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fdb1197..f76d12b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,7 @@ stages: - test - build - - my.remarkbox.com + - deploy test: stage: test @@ -47,12 +47,8 @@ build: - commit-hash.txt expire_in: 1 month - -my.remarkbox.com: - stage: my.remarkbox.com - tags: ["my.remarkbox.com"] - script: - # publish build to Salt Master - - sudo /opt/salt-call-state-highstate.sh - rules: - - if: '$CI_COMMIT_BRANCH == "main"' +deploy: + stage: deploy + needs: [build] + trigger: + include: .gitlab-ci.deploy.yml