Add deploy via SSH
This commit is contained in:
parent
003de0bbb1
commit
8b1e914791
@ -13,7 +13,17 @@ build site:
|
||||
stage: build
|
||||
script:
|
||||
- bundle exec jekyll build -d lorchess.ru
|
||||
artifacts:
|
||||
expire_in: 1 month
|
||||
paths:
|
||||
- lorchess.ru
|
||||
|
||||
deploy site:
|
||||
stage: deploy
|
||||
only:
|
||||
- master
|
||||
before_script:
|
||||
- mkdir -p ~/.ssh
|
||||
- echo "$DEPLOY_SSH_KEY" | tr -d '\r' > ~/.ssh/id_rsa
|
||||
- chmod 600 ~/.ssh/id_rsa
|
||||
- eval "$(ssh-agent -s)"
|
||||
- ssh-add ~/.ssh/id_rsa
|
||||
- ssh-keyscan -H $DEPLOY_SSH_HOST >> ~/.ssh/known_hosts
|
||||
script:
|
||||
- scp -r lorchess.ru $DEPLOY_SSH_USER@$DEPLOY_SSH_HOST:$DEPLOY_PATH
|
Loading…
Reference in New Issue
Block a user