diff options
author | 2018-09-17 22:28:45 +0200 | |
---|---|---|
committer | 2018-09-17 22:28:45 +0200 | |
commit | bba40bbf10af967f120ae44712f51550ecc5931c (patch) | |
tree | ac6263eb25af6032a4fee1fba27f9433d59a4f40 | |
parent | Rename `deploy` to `push` stage. (diff) |
Add autodeploy.
-rw-r--r-- | .gitlab-ci.yml | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0faeea57..64e8cd35 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,6 +2,7 @@ stages: - lint - test - publish + - deploy image: python:3.7-alpine .test-template: &test-template @@ -98,3 +99,17 @@ push-django: - django tags: - docker + +deploy: + stage: deploy + image: alpine:latest + before_script: + - apk add --no-cache openssh-client + - echo "$DJANGO_DEPLOY_SSH_PRIVATE_KEY" > privkey + script: + - ssh -i privkey [email protected] + environments: + name: Django staging + url: https://pysite.jchri.st + tags: + - docker |