diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fa95441..00ffac0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,14 +14,6 @@ # For more information, see: https://docs.gitlab.com/ee/ci/yaml/index.html#stages image: alpine:latest -before_script: - - echo "Installing the required programs..." - - apk add discount rsync openssh-client make bash perl gcc - - eval $(ssh-agent -s) - - echo "$DEPLOY_PRIVATE_KEY" | tr -d '\r' | ssh-add - - - mkdir -p ~/.ssh - - chmod 700 ~/.ssh - stages: # List of stages for jobs, and their order of execution - build - test @@ -29,6 +21,9 @@ stages: # List of stages for jobs, and their order of execution build-job: # This job runs in the build stage, which runs first. stage: build + before_script: + - echo "Installing the dependencies..." + - apk add discount make bash perl gcc script: - make THEME=discount-theme artifacts: @@ -42,5 +37,12 @@ unit-test-job: # This job runs in the test stage. deploy-job: # This job runs in the deploy stage. stage: deploy # It only runs when *both* jobs in the test stage complete successfully. + before_script: + - echo "Installing the dependencies..." + - apk add rsync openssh-client + - eval $(ssh-agent -s) + - echo "$DEPLOY_PRIVATE_KEY" | tr -d '\r' | ssh-add - + - mkdir -p ~/.ssh + - chmod 700 ~/.ssh script: - rsync -ciIlprz out/* deploy@devurandom.xyz:~/out/