- SSH is now done properly with host key checking
* Smoothed out some ci formatting - Pulling out neocities deploy pipeline
This commit is contained in:
parent
0e6935990f
commit
7ef53be386
@ -4,16 +4,17 @@ stages:
|
||||
- build
|
||||
- deploy
|
||||
|
||||
variables:
|
||||
SHOPTS: "-o StrictHostKeyChecking=no"
|
||||
|
||||
|
||||
# Setup the SSH Key in required for VPS deployment first
|
||||
before_script:
|
||||
- eval $(ssh-agent -s)
|
||||
- eval "$(ssh-agent -s)"
|
||||
- echo "${SSH_PRIVATE_KEY}" | ssh-add - > /dev/null
|
||||
|
||||
- mkdir -p ~/.ssh/
|
||||
- chmod 700 ~/.ssh/
|
||||
|
||||
- ssh-keyscan $VPS_HOST 2>&1 >> ~/.ssh/known_hosts
|
||||
- chmod 644 ~/.ssh/known_hosts
|
||||
|
||||
build-site:
|
||||
only:
|
||||
refs:
|
||||
@ -22,11 +23,12 @@ build-site:
|
||||
stage: build
|
||||
|
||||
script:
|
||||
bash ./build.sh
|
||||
- hugo
|
||||
|
||||
artifacts:
|
||||
expire_in: 10 mins
|
||||
paths: ["./.mirror"]
|
||||
paths:
|
||||
- "public"
|
||||
|
||||
deploy-vps:
|
||||
only:
|
||||
@ -35,14 +37,16 @@ deploy-vps:
|
||||
|
||||
stage: deploy
|
||||
|
||||
# This is all fine because its just static html w/ no scripts :^)
|
||||
script:
|
||||
- ssh $SHOPTS root@shockrah.xyz "rm -rf /var/www/website"
|
||||
- scp $SHOPTS -r .mirror root@shockrah.xyz:/var/www/website/
|
||||
- ssh root@shockrah.xyz "rm -rf /var/www/website"
|
||||
- scp -r public/ root@shockrah.xyz:/var/www/website/
|
||||
|
||||
deploy-neocities:
|
||||
# This might get really ugly with neocities so hang on
|
||||
only:
|
||||
refs:
|
||||
- master
|
||||
- neocities
|
||||
|
||||
stage: deploy
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user