ff72c8c39f
* Finalizing change required for vps deployment
41 lines
668 B
YAML
41 lines
668 B
YAML
image: registry.gitlab.com/pages/hugo:latest
|
|
|
|
stages:
|
|
- deploy
|
|
|
|
|
|
variables:
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
|
SHOPTS: "-o StrictHostKeyChecking=no"
|
|
|
|
gitlab-pages:
|
|
stage: deploy
|
|
script:
|
|
- hugo
|
|
artifacts:
|
|
paths:
|
|
- public
|
|
only:
|
|
- 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
|
|
|
|
|
|
|