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:
|
2021-02-22 21:35:27 +00:00
|
|
|
- gitlab
|
|
|
|
- vps
|
2021-02-22 21:21:58 +00:00
|
|
|
|
|
|
|
|
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 22:42:40 +00:00
|
|
|
pages:
|
2021-02-22 21:35:27 +00:00
|
|
|
stage: gitlab
|
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:
|
2021-02-22 21:39:19 +00:00
|
|
|
image: shockrah/website:latest
|
2021-02-22 21:35:27 +00:00
|
|
|
stage: vps
|
|
|
|
needs:
|
2021-02-23 06:58:34 +00:00
|
|
|
- pages
|
2021-02-22 21:21:58 +00:00
|
|
|
|
|
|
|
dependencies:
|
2021-02-23 06:58:34 +00:00
|
|
|
- pages
|
2021-02-22 21:21:58 +00:00
|
|
|
|
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/
|
2021-02-22 21:21:58 +00:00
|
|
|
|
|
|
|
script:
|
|
|
|
- ssh $SHOPTS web@shockrah.xyz "rm -rf /var/www/resume"
|
|
|
|
- scp $SHOPTS -r public/ web@shockrah.xyz:/var/www/resume
|
|
|
|
|
|
|
|
|