core/.gitlab-ci.yml
2023-03-28 17:40:28 +02:00

26 lines
492 B
YAML

---
stages:
- deploy
variables:
APP_NAME: discoursio-api
SERVER: v2.discours.io
deploy:
image:
name: alpine/git
entrypoint: ["/bin/sh"]
stage: deploy
environment:
name: production
url: https://v2.discours.io
only:
- main
script:
- mkdir -p ~/.ssh
- ssh -o StrictHostKeyChecking=no dokku@$SERVER
- echo "${SSH_PRIVATE_KEY}" > ~/.ssh/id_rsa
- chmod 0400 ~/.ssh/id_rsa
- git remote add dokku dokku@$SERVER:$APP_NAME
- git push dokku