Skip to content

Commit

Permalink
Merge pull request #139 from mobeigi/none-add-data-new-webhook-deploy
Browse files Browse the repository at this point in the history
Update workflow to support parallel deploys for server + app
  • Loading branch information
mobeigi authored Aug 15, 2024
2 parents 177f832 + 1c51da1 commit bce1a5f
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/mobeigi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,22 @@ jobs:
needs: [ build_test_app, build_test_server ]
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- name: Deploy via webhook
uses: distributhor/workflow-webhook@v1
env:
- name: Deploy App (via webhook)
uses: distributhor/workflow-webhook@v2
with:
webhook_url: ${{ secrets.WEBHOOK_URL }}
webhook_secret: ${{ secrets.WEBHOOK_SECRET }}
data: '{
"DOCKER_COMPOSE_PROJECT_NAME": "${{ vars.APP_DOCKER_COMPOSE_PROJECT_NAME }}",
"GIT_REPOSITORY_NAME": "${{ vars.GIT_REPOSITORY_NAME }}"
}'

- name: Deploy Server (via webhook)
uses: distributhor/workflow-webhook@v2
with:
webhook_url: ${{ secrets.WEBHOOK_URL }}
webhook_secret: ${{ secrets.WEBHOOK_SECRET }}
data: '{
"DOCKER_COMPOSE_PROJECT_NAME": "${{ vars.SERVER_DOCKER_COMPOSE_PROJECT_NAME }}",
"GIT_REPOSITORY_NAME": "${{ vars.GIT_REPOSITORY_NAME }}"
}'

0 comments on commit bce1a5f

Please sign in to comment.