Commit fc4be35
authored
fix: Skip Netlify deployment for Dependabot PRs (#660)
Dependabot PRs cannot access repository secrets due to GitHub's security
model. This causes the Netlify preview deployment to fail with
'Unauthorized' errors.
Changes:
- Add conditional check to skip Netlify deploy when actor is dependabot[bot]
- Also skip for PRs from forks or when secrets are unavailable
- Add informative skip message step for transparency
- Only post PR comment when deployment actually succeeds
- Move secrets to job-level env for proper conditional access
This ensures:
- Dependabot PRs pass CI without Netlify preview (acceptable trade-off)
- Regular contributor PRs continue to get Netlify previews
- No security risks from exposing secrets to untrusted actors
- Clear logging when deployment is skipped
Fixes the issue reported in PR #6591 parent 6e967af commit fc4be35
1 file changed
+17
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
| |||
168 | 171 | | |
169 | 172 | | |
170 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
171 | 179 | | |
172 | 180 | | |
173 | 181 | | |
| |||
238 | 246 | | |
239 | 247 | | |
240 | 248 | | |
241 | | - | |
242 | | - | |
243 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
244 | 257 | | |
245 | | - | |
| 258 | + | |
246 | 259 | | |
247 | 260 | | |
248 | 261 | | |
| |||
0 commit comments