49 lines
745 B
YAML
49 lines
745 B
YAML
image: registry.gitlab.com/pages/hugo:latest
|
|
|
|
stages:
|
|
- gitlab
|
|
- vps
|
|
|
|
|
|
variables:
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
|
SHOPTS: "-o StrictHostKeyChecking=no"
|
|
|
|
pages:
|
|
stage: gitlab
|
|
only:
|
|
refs:
|
|
- master
|
|
script:
|
|
- hugo
|
|
artifacts:
|
|
paths:
|
|
- public
|
|
only:
|
|
- master
|
|
|
|
vps:
|
|
image: shockrah/website:latest
|
|
stage: vps
|
|
only:
|
|
refs:
|
|
- master
|
|
needs:
|
|
- pages
|
|
|
|
dependencies:
|
|
- 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
|
|
|
|
|