Commit 1ad0e05e authored by Matthieu Boileau's avatar Matthieu Boileau
Browse files

Update .gitlab-ci.yml

back to 2-separate jobs version
parent 71acbf51
Pipeline #3690 passed with stages
in 45 seconds
......@@ -27,11 +27,11 @@ build:
expire_in: 1 hour
apache-dev:
variables:
PUBLISH_DIR: ([ "$CI_COMMIT_REF_NAME" == "master" ] && "/var/www/html" || "/var/www/calcul-dev/$CI_COMMIT_REF_NAME")
stage: deploy
tags:
- pelican
variables:
PUBLISH_DIR: "/var/www/calcul-dev/$CI_COMMIT_REF_NAME"
only:
- pr_branch_deploy
- TEST-job-form
......@@ -43,7 +43,7 @@ apache-dev:
dependencies:
- build
script:
- if [ -z ${PUBLISH_DIR+x} ]; then echo "PUBLISH_DIR is unset" ; exit 1 ; else echo "Publishing branch $CI_COMMIT_REF_NAME to $PUBLISH_DIR"; fi
- echo "Publishing to $PUBLISH_DIR"
- rsync -av --delete --exclude 'attachments' output/ $PUBLISH_DIR/
- rsync -av --delete content/attachments/ $PUBLISH_DIR/attachments/
......@@ -52,7 +52,7 @@ apache:
tags:
- pelican
variables:
PUBLISH_DIR: "gitlab-runner@calcul.math.unistra.fr:/var/www/html"
PUBLISH_DIR: "/var/www/html"
only:
- master
dependencies:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment