Skip to content

Commit de2806d

Browse files
authored
chore(ci): extract trigger-website-deploy into reusable workflow (#2267)
## Summary - Extract the `trigger-website-deploy` job into a separate reusable workflow - Can be called from `release-please.yml` (existing behavior unchanged) - Can now be triggered manually via workflow_dispatch
1 parent c19b7e6 commit de2806d

File tree

2 files changed

+27
-9
lines changed

2 files changed

+27
-9
lines changed

.github/workflows/release-please.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,10 @@ jobs:
106106
GCP_WORKLOAD_IDENTITY_PROVIDER_IDENTIFIER: ${{ secrets.DEVELOPMENT_OAUTH_PROXY_RELEASER_GCP_WORKLOAD_IDENTITY_PROVIDER_IDENTIFIER }}
107107

108108
trigger-website-deploy:
109-
name: Trigger Website Vercel Deploy
110-
runs-on: ubuntu-latest
109+
name: Trigger Website Deploy
110+
if: needs.release-please.outputs.platform_release_created
111+
uses: ./.github/workflows/trigger-website-deploy.yml
111112
needs:
112113
- release-please
113-
if: needs.release-please.outputs.platform_release_created
114-
steps:
115-
- name: Trigger Vercel Deploy Hook
116-
env:
117-
VERCEL_DEPLOY_HOOK_URL: ${{ secrets.WEBSITE_VERCEL_DEPLOY_HOOK_URL }}
118-
run: |
119-
curl -X POST "$VERCEL_DEPLOY_HOOK_URL"
114+
secrets:
115+
WEBSITE_VERCEL_DEPLOY_HOOK_URL: ${{ secrets.WEBSITE_VERCEL_DEPLOY_HOOK_URL }}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Trigger Website Deploy
2+
3+
on:
4+
workflow_call:
5+
secrets:
6+
WEBSITE_VERCEL_DEPLOY_HOOK_URL:
7+
required: true
8+
description: Vercel deploy hook URL for the website
9+
workflow_dispatch:
10+
11+
permissions: {}
12+
13+
jobs:
14+
trigger-website-deploy:
15+
name: Trigger Website Vercel Deploy
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Trigger Vercel Deploy Hook
19+
env:
20+
VERCEL_DEPLOY_HOOK_URL: ${{ secrets.WEBSITE_VERCEL_DEPLOY_HOOK_URL }}
21+
run: |
22+
curl -X POST "$VERCEL_DEPLOY_HOOK_URL"

0 commit comments

Comments
 (0)