This commit is contained in:
parent
32b89a038d
commit
f4906f454b
1 changed files with 19 additions and 0 deletions
|
@ -9,3 +9,22 @@ steps:
|
|||
- apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community go hugo git
|
||||
- hugo --gc --minify
|
||||
- ls public
|
||||
|
||||
- name: Deploy
|
||||
image: alpine:latest
|
||||
environment:
|
||||
SSH_HOST:
|
||||
from_secret: SSH_HOST
|
||||
SSH_USER:
|
||||
from_secret: SSH_USER
|
||||
SSH_PATH:
|
||||
from_secret: SSH_PATH
|
||||
SSH_PRIVATE_KEY:
|
||||
from_secret: SSH_PRIVATE_KEY
|
||||
commands:
|
||||
- apk add --no-cache openssh-client rsync
|
||||
- mkdir -p ~/.ssh
|
||||
- echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
|
||||
- chmod 600 ~/.ssh/id_rsa
|
||||
- ssh-keyscan $SSH_HOST >> ~/.ssh/known_hosts
|
||||
- rsync -avz public/ $SSH_USER@$SSH_HOST:$SSH_PATH
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue