Skip to content

Commit 43d9a36

Browse files
committed
[actions] add secondary deployment
1 parent 0a71b45 commit 43d9a36

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ jobs:
2626

2727
deploy:
2828
runs-on: ubuntu-latest
29+
permissions:
30+
contents: read
31+
deployments: write
32+
environment: production
33+
concurrency: production
2934
needs:
3035
- build
3136

@@ -61,3 +66,25 @@ jobs:
6166
-var "app-config-b64=${{ secrets.APP_CONFIG_B64 }}" \
6267
-var "app-env-json-b64=${{ secrets.APP_ENV_JSON_B64 }}" \
6368
-var "memory-limit=${{ vars.MEMORY_LIMIT }}"
69+
70+
deploy-secondary:
71+
needs: build
72+
runs-on: ubuntu-latest
73+
permissions:
74+
contents: read
75+
deployments: write
76+
environment: production-secondary
77+
concurrency: production
78+
env:
79+
DEPLOY_WEBHOOK_URL: ${{ secrets.DEPLOY_WEBHOOK_URL }}
80+
steps:
81+
- name: Trigger Deploy webhook
82+
if: ${{ env.DEPLOY_WEBHOOK_URL != '' }}
83+
run: |
84+
curl -X POST "${DEPLOY_WEBHOOK_URL}" \
85+
--fail \
86+
--silent \
87+
--max-time 10 \
88+
--retry 3 \
89+
--retry-delay 5 \
90+
|| exit 1

0 commit comments

Comments
 (0)