File tree 2 files changed +11
-2
lines changed
2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -219,7 +219,8 @@ jobs:
219
219
cd unified-docs-frontend-preview
220
220
echo "HASHI_ENV=unified-docs-sandbox" >> .env
221
221
echo "UNIFIED_DOCS_API=${{ needs.deploy-unified-docs-api-preview.outputs.preview_url }}" >> .env
222
-
222
+ echo "VERCEL_AUTOMATION_BYPASS_SECRET=${{ secrets.VERCEL_AUTOMATION_BYPASS_SECRET }}" >> .env
223
+
223
224
- name : Build dev-portal
224
225
uses : nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
225
226
env :
@@ -304,7 +305,7 @@ jobs:
304
305
--max-concurrency 24
305
306
--no-progress
306
307
--verbose
307
- --header x-vercel-protection-bypass ${{ secrets.VERCEL_AUTOMATION_BYPASS_SECRET }}
308
+ --header x-vercel-protection-bypass= ${{ secrets.VERCEL_AUTOMATION_BYPASS_SECRET }}
308
309
fail : false
309
310
env :
310
311
GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
Original file line number Diff line number Diff line change @@ -12,6 +12,12 @@ const SELF_URL = process.env.VERCEL_URL
12
12
? `https://${ process . env . VERCEL_URL } `
13
13
: `http://localhost:${ process . env . UNIFIED_DOCS_PORT } `
14
14
15
+ const headers = process . env . VERCEL_URL
16
+ ? new Headers ( {
17
+ 'x-vercel-protection-bypass' : process . env . VERCEL_AUTOMATION_BYPASS_SECRET ,
18
+ } )
19
+ : new Headers ( )
20
+
15
21
/**
16
22
* NOTE: we currently read files by fetching them from the `public` folder
17
23
* via the Vercel CDN.
@@ -21,6 +27,7 @@ export const readFile = async (filePath: string[]) => {
21
27
try {
22
28
const res = await fetch ( `${ SELF_URL } /${ filePath . join ( '/' ) } ` , {
23
29
cache : 'no-cache' ,
30
+ headers,
24
31
} )
25
32
26
33
if ( ! res . ok ) {
@@ -49,6 +56,7 @@ export const getAssetData = async (
49
56
try {
50
57
const res = await fetch ( `${ SELF_URL } /${ filePath . join ( '/' ) } ` , {
51
58
cache : 'no-cache' ,
59
+ headers,
52
60
} )
53
61
54
62
if ( ! res . ok ) {
You can’t perform that action at this time.
0 commit comments