blog/.gitlab-ci.yml

16 lines
420 B
YAML
Raw Normal View History

2020-10-26 20:02:13 +00:00
image: shockrah/website:1.2
2020-10-26 08:44:15 +00:00
before_script:
- eval $(ssh-agent -s)
2020-10-26 19:12:21 +00:00
- echo "${SSH_PRIVATE_KEY}" | ssh-add - > /dev/null
2020-10-26 08:44:15 +00:00
- mkdir -p ~/.ssh/
- chmod 700 ~/.ssh/
deploy:
stage: build
script:
- bash ./build.sh
2020-10-26 08:44:15 +00:00
- echo the next item will fail
- sshpass -p $SHH_PASS ssh "rm -rf /var/www/website"
- sshpass -p $SSH_PASS scp -o StrictHostKeyChecking=no -r .mirror root@shockrah.xyz:/var/www/website/