Add ssh deploy config
This commit is contained in:
+11
-1
@@ -3,9 +3,19 @@ image: monachus/hugo
|
||||
variables:
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
|
||||
pages:
|
||||
before_script:
|
||||
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client rsync -y )'
|
||||
- eval $(ssh-agent -s)
|
||||
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
|
||||
- mkdir -p ~/.ssh
|
||||
- chmod 700 ~/.ssh
|
||||
- echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
|
||||
- chmod 644 ~/.ssh/known_hosts
|
||||
|
||||
deploy:
|
||||
script:
|
||||
- hugo
|
||||
- rsync -av --delete --exclude presentations public/ james@shee.sh:/srv/www/jamesmcdonald
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
|
||||
Reference in New Issue
Block a user