Skip to content

Commit 959c31f

Browse files
authored
Merge pull request #5454 from Agenta-AI/ci/website-preview-guards
ci(website): preview skips Dependabot PRs and fires on ready_for_review
2 parents 6f6d5b0 + 3dae906 commit 959c31f

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/15-website-preview.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: "15 - website preview"
22

33
on:
44
pull_request:
5-
types: [opened, synchronize, reopened]
5+
types: [opened, synchronize, reopened, ready_for_review]
66
paths:
77
- 'website/**'
88
- '.github/workflows/15-website-preview.yml'
@@ -30,10 +30,13 @@ jobs:
3030
name: Build and deploy preview
3131
runs-on: ubuntu-latest
3232
# Fork PRs get no secrets: skip when the head repo is not this repo.
33+
# Dependabot PRs run without repository secrets (GitHub policy), so the
34+
# deploy could never succeed there; skip them cleanly instead of failing.
3335
if: >-
3436
github.event_name == 'workflow_dispatch' ||
3537
(github.event.pull_request.head.repo.full_name == github.repository &&
36-
!github.event.pull_request.draft)
38+
!github.event.pull_request.draft &&
39+
github.actor != 'dependabot[bot]')
3740
env:
3841
PR_NUMBER: ${{ github.event.pull_request.number || inputs.pr_number }}
3942
steps:

0 commit comments

Comments
 (0)