Skip to content

Commit

Permalink
ci: add automatic deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
kdurek committed Jul 28, 2024
1 parent d3b77af commit a1d05e9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ env:
# SKIP_ENV_VALIDATION: 1
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
DOKPLOY_URL: ${{ secrets.DOKPLOY_URL }}
DOKPLOY_TOKEN: ${{ secrets.DOKPLOY_TOKEN }}
DOKPLOY_APP: ${{ secrets.DOKPLOY_APP }}

jobs:
build-and-push-image-and-deploy:
Expand Down Expand Up @@ -81,3 +84,14 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Deploy
run: |
curl -X 'POST' \
'${{ env.DOKPLOY_URL }}/api/application.deploy' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ${{ env.DOKPLOY_TOKEN }}' \
-d '{
"applicationId": ${{ env.DOKPLOY_APP }},
}'

0 comments on commit a1d05e9

Please sign in to comment.