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
|
2019-08-20 02:55:29 +00:00
|
|
|
|
2021-11-06 03:09:52 +00:00
|
|
|
# Only because it's broken right now
|
2021-02-22 22:42:40 +00:00
|
|
|
pages:
|
2021-02-22 21:35:27 +00:00
|
|
|
stage: gitlab
|
2021-10-19 07:24:07 +00:00
|
|
|
only:
|
|
|
|
refs:
|
|
|
|
- master
|
2021-11-06 03:09:52 +00:00
|
|
|
when: manual
|
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
|
2021-10-19 07:24:07 +00:00
|
|
|
only:
|
|
|
|
refs:
|
|
|
|
- master
|
2021-02-22 21:35:27 +00:00
|
|
|
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-11-06 03:09:52 +00:00
|
|
|
- ssh-keyscan shockrah.xyz 2>&1 >> ~/.ssh/known_hosts
|
|
|
|
- chmod 644 ~/.ssh/known_hosts
|
2021-02-22 21:21:58 +00:00
|
|
|
|
|
|
|
script:
|
2021-11-06 03:09:52 +00:00
|
|
|
- ssh web@shockrah.xyz "rm -rf /var/www/resume"
|
|
|
|
- scp -r public/ web@shockrah.xyz:/var/www/resume
|
2021-02-22 21:21:58 +00:00
|
|
|
|
|
|
|
|