resume/.gitlab-ci.yml

51 lines
817 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:
2021-11-06 03:15:11 +00:00
- build
2021-02-22 21:35:27 +00:00
- vps
2019-08-20 02:57:47 +00:00
variables:
GIT_SUBMODULE_STRATEGY: recursive
2019-08-20 02:55:29 +00:00
# Only because it's broken right now
2021-11-06 03:15:11 +00:00
build:
stage: build
only:
refs:
- master
script:
- hugo
artifacts:
paths:
2019-08-20 02:55:29 +00:00
- public
only:
- master
vps:
image: shockrah/website:latest
2021-02-22 21:35:27 +00:00
stage: vps
only:
refs:
- master
2021-02-22 21:35:27 +00:00
needs:
2021-11-06 03:15:11 +00:00
- build
dependencies:
2021-11-06 03:15:11 +00:00
- build
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/
- ssh-keyscan shockrah.xyz 2>&1 >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
script:
- ssh web@shockrah.xyz "rm -rf /var/www/resume"
- scp -r public/ web@shockrah.xyz:/var/www/resume