2019-08-20 02:57:47 +00:00
|
|
|
image: registry.gitlab.com/pages/hugo:latest
|
2019-08-20 02:55:29 +00:00
|
|
|
|
2021-02-22 21:21:58 +00:00
|
|
|
stages:
|
|
|
|
- deploy
|
|
|
|
|
|
|
|
|
2019-08-20 02:57:47 +00:00
|
|
|
variables:
|
|
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
2021-02-22 21:21:58 +00:00
|
|
|
SHOPTS: "-o StrictHostKeyChecking=no"
|
2019-08-20 02:55:29 +00:00
|
|
|
|
2021-02-22 21:21:58 +00:00
|
|
|
gitlab-pages:
|
|
|
|
stage: deploy
|
2019-08-20 02:41:28 +00:00
|
|
|
script:
|
|
|
|
- hugo
|
|
|
|
artifacts:
|
|
|
|
paths:
|
2019-08-20 02:55:29 +00:00
|
|
|
- public
|
2019-08-20 02:41:28 +00:00
|
|
|
only:
|
2021-02-22 21:21:58 +00:00
|
|
|
- master
|
|
|
|
|
|
|
|
vps:
|
|
|
|
stage: deploy
|
|
|
|
needs: gitlab-pages
|
|
|
|
|
|
|
|
dependencies:
|
|
|
|
- gitlab-pages
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
|
|
|
|
|