Skip to content

Commit

Permalink
Set up CI job for deployment with dokku
Browse files Browse the repository at this point in the history
For now, this is only done when pushing to `deployment/production` and
the GitHub Actions variable `DOKKU_DEPLOY_PRODUCTION_GIT_URL` is set.
  • Loading branch information
bbliem committed Oct 14, 2024
1 parent 030c390 commit f1084e1
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,20 @@ jobs:
project_id: watch-ui
build_id: ${{ needs.build.outputs.build_id }}
deployment_env: ${{ needs.build.outputs.deployment_env }}

dokku-deploy:
needs: [build, deploy]
# FIXME: Should be configurable
if: needs.build.outputs.deployment_env == 'production' && vars.DOKKU_DEPLOY_PRODUCTION_GIT_URL != ''
runs-on: runner-prod
container:
image: dokku/ci-docker-image:latest
steps:
- name: Push to dokku
run: dokku-deploy
env:
GIT_REMOTE_URL: ${{ vars.DOKKU_DEPLOY_PRODUCTION_GIT_URL }}
SSH_PRIVATE_KEY: ${{ secrets.DOKKU_SSH_PRIVATE_KEY }}
DEPLOY_DOCKER_IMAGE: ${{ needs.build.outputs.image }}:${{ needs.build.outputs.image_tag }}
# For debugging
# TRACE: '1'

0 comments on commit f1084e1

Please sign in to comment.