Skip to content

Commit 6c2b6e3

Browse files
committed
Fix to e2e error and github runner secret for dependabot PRs
1 parent 026f5b8 commit 6c2b6e3

13 files changed

Lines changed: 60 additions & 11 deletions

File tree

‎.github/workflows/deployment-preview.yml‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
3636
VERCEL_ORG_ID: ${{ vars.VERCEL_ORG_ID }}
3737
VERCEL_PROJECT_ID: ${{ vars.VERCEL_PROJECT_ID }}
38+
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
3839
WEBMENTION_IO_TOKEN: ${{ secrets.WEBMENTION_IO_TOKEN }}
3940

4041
# Secrets are not available to forked PRs. Also, we don't want to deploy untrusted forks.
@@ -74,12 +75,18 @@ jobs:
7475
{"projectId":"$VERCEL_PROJECT_ID","orgId":"$VERCEL_ORG_ID","settings":{"framework":"astro","installCommand":"npm ci --force"}}
7576
EOF
7677
78+
- name: Skip preview deployment when Vercel token is unavailable
79+
if: env.VERCEL_TOKEN == ''
80+
run: |
81+
echo "Skipping Vercel preview deployment because VERCEL_TOKEN is unavailable for this event."
82+
echo "This is expected for Dependabot pull requests and other untrusted contexts where GitHub withholds secrets."
83+
7784
- name: Vercel build (preview)
78-
env:
79-
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
80-
run: vercel build --token=${VERCEL_TOKEN}
85+
if: env.VERCEL_TOKEN != ''
86+
run: vercel build --token="${VERCEL_TOKEN}"
8187

8288
- name: Deploy to Vercel (preview)
89+
if: env.VERCEL_TOKEN != ''
8390
uses: ./.github/actions/deploy-to-vercel-action
8491
with:
8592
GITHUB_TOKEN: ${{ github.token }}

‎.github/workflows/deployment-production.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
env:
7272
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
7373
NODE_ENV: production
74-
run: vercel build --prod --token=${VERCEL_TOKEN}
74+
run: vercel build --prod --token="${VERCEL_TOKEN}"
7575

7676
##
7777
# This requires Playwright to succeed when triggering e2e tests from a merge_group

‎.github/workflows/playwright.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ jobs:
160160
161161
- name: Upload Playwright report
162162
if: always()
163-
uses: actions/upload-artifact@v7
163+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
164164
with:
165165
name: playwright-report
166166
path: playwright-report/

‎.github/workflows/test.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575

7676
- name: Upload test coverage
7777
if: always() && hashFiles('coverage/coverage-summary.json') != ''
78-
uses: actions/upload-artifact@v7
78+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
7979
with:
8080
name: test-coverage
8181
path: coverage/

‎@types/window.d.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ declare global {
112112
* Exposes client environment helper values for diagnostics fixtures.
113113
*/
114114
environmentClientValues?: EnvironmentClientValues
115+
116+
/**
117+
* Tracks one-time Vercel analytics injection across Astro view transitions.
118+
*/
119+
__webstackAnalyticsInjected?: boolean
115120
}
116121
}
117122

‎package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
"astro-link-validator": "github:rodgtr1/astro-link-validator",
142142
"astro-og-canvas": "^0.11.0",
143143
"astro-vtbot": "^2.1.12",
144-
"baseline-browser-mapping": "^2.10.18",
144+
"baseline-browser-mapping": "^2.10.19",
145145
"canvas-confetti": "^1.9.4",
146146
"confusing-browser-globals": "1.0.11",
147147
"cross-env": "^10.1.0",
@@ -243,7 +243,7 @@
243243
"unist-util-is": "^6.0.1",
244244
"unist-util-visit": "^5.1.0",
245245
"uuid": "^13.0.0",
246-
"vercel": "^51.2.0",
246+
"vercel": "^51.2.1",
247247
"vite": "^7.3.2",
248248
"vitest": "4.1.4",
249249
"vitest-axe": "0.1.0",
28.2 KB
Loading
12.8 KB
Loading
10.4 KB
Loading
3.29 KB
Loading

0 commit comments

Comments
 (0)