+ Adding back deployment job
This commit is contained in:
parent
cba5e68fe2
commit
0e2623f65a
@ -2,13 +2,13 @@ image: registry.gitlab.com/pages/hugo:latest
|
|||||||
|
|
||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
- vps
|
- deploy
|
||||||
|
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
GIT_SUBMODULE_STRATEGY: recursive
|
GIT_SUBMODULE_STRATEGY: recursive
|
||||||
|
|
||||||
# Only because it's broken right now
|
# This build stage will also leave artifacts ready for gitlab pages to use
|
||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
only:
|
only:
|
||||||
@ -19,6 +19,25 @@ build:
|
|||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- public
|
- public
|
||||||
only:
|
|
||||||
- master
|
|
||||||
|
|
||||||
|
# Here we deploy the site
|
||||||
|
deploy-to-athens:
|
||||||
|
stage: deploy
|
||||||
|
image: shockrah/website:latest
|
||||||
|
only:
|
||||||
|
refs:
|
||||||
|
- master
|
||||||
|
needs:
|
||||||
|
- build
|
||||||
|
dependencies:
|
||||||
|
- build
|
||||||
|
before_script:
|
||||||
|
- eval $(ssh-agent -s)
|
||||||
|
- echo "${WEB_USR_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.shockrah.xyz"
|
||||||
|
- scp -r public/ web@shockrah.xyz:/var/www/resume.shockrah.xyz
|
||||||
|
Loading…
Reference in New Issue
Block a user