Skip to content

Commit ce8ce7a

Browse files
ci: allow dependabot PRs to skip deployments to cloudflare (#1235)
* ci: allow dependabot PRs to deploy via pull_request_target GitHub restricts secrets for pull_request events triggered by dependabot[bot]. Switch dependabot PRs to pull_request_target, which runs in the base branch context and has access to secrets. - Add pull_request_target trigger - Route dependabot PRs through pull_request_target only - Route all other PRs through pull_request only (no double runs) - Checkout PR head SHA for pull_request_target events * Update .github/workflows/deploy.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * bypass cloudflare * Simplify deploy job condition in workflow file * Fix conditional syntax in deploy workflow steps --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 5226348 commit ce8ce7a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ jobs:
5353
env:
5454
VITE_DEPLOYMENT_URL: ${{ env.VITE_DEPLOYMENT_URL }}
5555
- name: Deploy
56+
if: ${{ github.actor != 'dependabot[bot]' }}
5657
id: deploy
5758
uses: cloudflare/wrangler-action@v3
5859
with:
@@ -64,6 +65,7 @@ jobs:
6465
env:
6566
FORCE_COLOR: 0
6667
- name: Comment PR with deployment link
68+
if: ${{ github.actor != 'dependabot[bot]' }}
6769
uses: marocchino/sticky-pull-request-comment@v2
6870
with:
6971
recreate: true

0 commit comments

Comments
 (0)