resume/.gitlab-ci.yml

41 lines
656 B
YAML
Raw Normal View History

2019-08-20 02:57:47 +00:00
image: registry.gitlab.com/pages/hugo:latest
2019-08-20 02:55:29 +00:00
stages:
- deploy
2019-08-20 02:57:47 +00:00
variables:
GIT_SUBMODULE_STRATEGY: recursive
SHOPTS: "-o StrictHostKeyChecking=no"
2019-08-20 02:55:29 +00:00
gitlab-pages:
stage: deploy
script:
- hugo
artifacts:
paths:
2019-08-20 02:55:29 +00:00
- public
only:
- master
vps:
stage: deploy
needs: gitlab-pages
dependencies:
- gitlab-pages
2021-02-22 21:33:25 +00:00
# setup ssh environment first
before_script:
- eval $(ssh-agent -s)
- echo "${SSH_PRIVATE_KEY}" | ssh-add - > /dev/null
- mkdir -p ~/.ssh/
- chmod 700 ~/.ssh/
script:
- ssh $SHOPTS web@shockrah.xyz "rm -rf /var/www/resume"
- scp $SHOPTS -r public/ web@shockrah.xyz:/var/www/resume