Commit 354926b7 authored by Betz's avatar Betz

better pipeline stages

parent 8d806bc0
Pipeline #94603119 failed
......@@ -14,7 +14,8 @@ before_script:
- chmod 644 ~/.ssh/known_hosts
build:
Build:
stage: Build
variables:
GITLAB_USER_LOGIN: $GITLAB_USER_LOGIN
CI_BUILD_REF: $CI_BUILD_REF
......@@ -26,13 +27,19 @@ build:
- hugo version
- hugo
artifacts:
expire_in: 1 day
paths:
- public
only:
- master
deploy:
Deploy:
stage: Deploy
script:
- echo $(date +%Y.%m.%d)
- tar cz public | ssh gitlab@hsbxl.be "mkdir -p /www/versions/$(date +%Y.%m.%d); cd /www/versions/$(date +%Y.%m.%d); tar xz; rm /www/live; ln -sf versions/$(date +%Y.%m.%d)/public /www/live"
- curl -XPOST -d '{"msgtype":"m.text", "body":"Site updated."}' "https://hackerspaces.be/_matrix/client/r0/rooms/!mnQLxCDhwmKozNmuIB:hackerspaces.be/send/m.room.message?access_token=$MATRIX_ACCESS_TOKEN"
Notify:
stage: Deploy
script:
- curl -XPOST -d '{"msgtype":"m.text", "body":"Site updated."}' "https://hackerspaces.be/_matrix/client/r0/rooms/!mnQLxCDhwmKozNmuIB:hackerspaces.be/send/m.room.message?access_token=$MATRIX_ACCESS_TOKEN"
\ No newline at end of file
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