added gitlab CD step to automatically deploy posts
This commit is contained in:
parent
3cd04375b9
commit
6d728fadba
13
.gitlab-ci.yml
Normal file
13
.gitlab-ci.yml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
deploy-prod:
|
||||||
|
stage: deploy
|
||||||
|
image: alpine
|
||||||
|
before_script:
|
||||||
|
- 'command -v ssh-agent > /dev/null || (apk add --update openssh-client)'
|
||||||
|
- eval $(ssh-agent -s)
|
||||||
|
- echo "$GITLAB_LIVILLA_PRIV" | tr -d '\r' | ssh-add -
|
||||||
|
- mkdir -p ~/.ssh
|
||||||
|
- chmod 700 ~/.ssh
|
||||||
|
- ssh-keyscan $LIVILLA_IP >> ~/.ssh/known_hosts
|
||||||
|
- chmod 644 ~/.ssh/known_hosts
|
||||||
|
script:
|
||||||
|
- ssh $LIVILLA_USER@$LIVILLA_IP 'cd phaetere/blog_posts;git pull'
|
Loading…
Reference in New Issue
Block a user