Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
818aa245
Unverified
Commit
818aa245
authored
May 04, 2026
by
Sebastian "Sebbie" Silbermann
Committed by
GitHub
May 04, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ci] Allow configuring the base URL for preview builds (#93464)
parent
5452439f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
9 deletions
+22
-9
add-comment.js
.github/actions/next-stats-action/src/add-comment.js
+1
-1
action-info.js
.github/actions/next-stats-action/src/prepare/action-info.js
+3
-0
build_and_deploy.yml
.github/workflows/build_and_deploy.yml
+1
-1
build_and_test.yml
.github/workflows/build_and_test.yml
+8
-4
pull_request_stats.yml
.github/workflows/pull_request_stats.yml
+1
-0
create-preview-tarballs.js
scripts/create-preview-tarballs.js
+4
-2
test-new-tests.mjs
scripts/test-new-tests.mjs
+4
-1
No files found.
.github/actions/next-stats-action/src/add-comment.js
View file @
818aa245
...
@@ -1036,7 +1036,7 @@ function generatePrTarballSection(actionInfo) {
...
@@ -1036,7 +1036,7 @@ function generatePrTarballSection(actionInfo) {
<summary><strong>📎 Tarball URL</strong></summary>
<summary><strong>📎 Tarball URL</strong></summary>
\`\`\`
\`\`\`
https://vercel-packages.vercel.app/next
/commits/
${
actionInfo
.
commitId
}
/next
${
actionInfo
.
previewBuildsBaseUrl
}
/commits/
${
actionInfo
.
commitId
}
/next
\`\`\`
\`\`\`
</details>
</details>
...
...
.github/actions/next-stats-action/src/prepare/action-info.js
View file @
818aa245
...
@@ -15,6 +15,7 @@ module.exports = function actionInfo() {
...
@@ -15,6 +15,7 @@ module.exports = function actionInfo() {
GITHUB_REPOSITORY
,
GITHUB_REPOSITORY
,
GITHUB_EVENT_PATH
,
GITHUB_EVENT_PATH
,
PR_STATS_COMMENT_TOKEN
,
PR_STATS_COMMENT_TOKEN
,
PREVIEW_BUILDS_BASE_URL
,
}
=
process
.
env
}
=
process
.
env
delete
process
.
env
.
GITHUB_TOKEN
delete
process
.
env
.
GITHUB_TOKEN
...
@@ -59,6 +60,8 @@ module.exports = function actionInfo() {
...
@@ -59,6 +60,8 @@ module.exports = function actionInfo() {
isRelease
:
isRelease
:
GITHUB_REPOSITORY
===
'vercel/next.js'
&&
GITHUB_REPOSITORY
===
'vercel/next.js'
&&
(
GITHUB_REF
||
''
).
includes
(
'canary'
),
(
GITHUB_REF
||
''
).
includes
(
'canary'
),
previewBuildsBaseUrl
:
PREVIEW_BUILDS_BASE_URL
||
'https://vercel-packages.vercel.app/next'
,
}
}
if
(
info
.
isRelease
)
{
if
(
info
.
isRelease
)
{
...
...
.github/workflows/build_and_deploy.yml
View file @
818aa245
...
@@ -483,7 +483,7 @@ jobs:
...
@@ -483,7 +483,7 @@ jobs:
-
name
:
Create tarballs
-
name
:
Create tarballs
# github.event.after is available on push and pull_request#synchronize events.
# github.event.after is available on push and pull_request#synchronize events.
# For workflow_dispatch events, github.sha is the head commit.
# For workflow_dispatch events, github.sha is the head commit.
run
:
node scripts/create-preview-tarballs.js "${{ github.event.after || github.sha }}" "${{ runner.temp }}/preview-tarballs"
run
:
node scripts/create-preview-tarballs.js "${{ github.event.after || github.sha }}" "${{ runner.temp }}/preview-tarballs"
"${{ vars.PREVIEW_BUILDS_BASE_URL }}"
-
name
:
Upload tarballs
-
name
:
Upload tarballs
uses
:
actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
# v7.0.1
uses
:
actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
# v7.0.1
...
...
.github/workflows/build_and_test.yml
View file @
818aa245
...
@@ -782,7 +782,8 @@ jobs:
...
@@ -782,7 +782,8 @@ jobs:
node scripts/test-new-tests.mjs \
node scripts/test-new-tests.mjs \
--flake-detection \
--flake-detection \
--mode dev \
--mode dev \
--group ${{ matrix.group }}
--group ${{ matrix.group }} \
--preview-builds-base-url "${{ vars.PREVIEW_BUILDS_BASE_URL }}"
stepName
:
'
test-new-tests-dev-${{matrix.group}}'
stepName
:
'
test-new-tests-dev-${{matrix.group}}'
timeout_minutes
:
60
# Increase the default timeout as tests are intentionally run multiple times to detect flakes
timeout_minutes
:
60
# Increase the default timeout as tests are intentionally run multiple times to detect flakes
...
@@ -807,7 +808,8 @@ jobs:
...
@@ -807,7 +808,8 @@ jobs:
node scripts/test-new-tests.mjs \
node scripts/test-new-tests.mjs \
--flake-detection \
--flake-detection \
--mode start \
--mode start \
--group ${{ matrix.group }}
--group ${{ matrix.group }} \
--preview-builds-base-url "${{ vars.PREVIEW_BUILDS_BASE_URL }}"
stepName
:
'
test-new-tests-start-${{matrix.group}}'
stepName
:
'
test-new-tests-start-${{matrix.group}}'
timeout_minutes
:
60
# Increase the default timeout as tests are intentionally run multiple times to detect flakes
timeout_minutes
:
60
# Increase the default timeout as tests are intentionally run multiple times to detect flakes
secrets
:
inherit
secrets
:
inherit
...
@@ -834,7 +836,8 @@ jobs:
...
@@ -834,7 +836,8 @@ jobs:
export __NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES=true
export __NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES=true
node scripts/test-new-tests.mjs \
node scripts/test-new-tests.mjs \
--mode deploy \
--mode deploy \
--group ${{ matrix.group }}
--group ${{ matrix.group }} \
--preview-builds-base-url "${{ vars.PREVIEW_BUILDS_BASE_URL }}"
stepName
:
'
test-new-tests-deploy-${{matrix.group}}'
stepName
:
'
test-new-tests-deploy-${{matrix.group}}'
secrets
:
inherit
secrets
:
inherit
...
@@ -868,7 +871,8 @@ jobs:
...
@@ -868,7 +871,8 @@ jobs:
export NEXT_E2E_TEST_TIMEOUT=240000
export NEXT_E2E_TEST_TIMEOUT=240000
node scripts/test-new-tests.mjs \
node scripts/test-new-tests.mjs \
--mode deploy \
--mode deploy \
--group ${{ matrix.group }}
--group ${{ matrix.group }} \
--preview-builds-base-url "${{ vars.PREVIEW_BUILDS_BASE_URL }}"
stepName
:
'
test-new-tests-deploy-cache-components-${{matrix.group}}'
stepName
:
'
test-new-tests-deploy-cache-components-${{matrix.group}}'
secrets
:
inherit
secrets
:
inherit
...
...
.github/workflows/pull_request_stats.yml
View file @
818aa245
...
@@ -121,6 +121,7 @@ jobs:
...
@@ -121,6 +121,7 @@ jobs:
TURBO_TEAM
:
${{ env.TURBO_TEAM }}
TURBO_TEAM
:
${{ env.TURBO_TEAM }}
TURBO_TOKEN
:
${{ secrets.TURBO_TOKEN }}
TURBO_TOKEN
:
${{ secrets.TURBO_TOKEN }}
TURBO_CACHE
:
${{ env.TURBO_CACHE }}
TURBO_CACHE
:
${{ env.TURBO_CACHE }}
PREVIEW_BUILDS_BASE_URL
:
${{ vars.PREVIEW_BUILDS_BASE_URL }}
-
name
:
Upload stats results
-
name
:
Upload stats results
if
:
${{ steps.docs-change.outputs.DOCS_CHANGE == 'nope' }}
if
:
${{ steps.docs-change.outputs.DOCS_CHANGE == 'nope' }}
...
...
scripts/create-preview-tarballs.js
View file @
818aa245
...
@@ -8,7 +8,9 @@ async function main() {
...
@@ -8,7 +8,9 @@ async function main() {
const
[
const
[
githubHeadSha
,
githubHeadSha
,
tarballDirectory
=
path
.
join
(
os
.
tmpdir
(),
'vercel-nextjs-preview-tarballs'
),
tarballDirectory
=
path
.
join
(
os
.
tmpdir
(),
'vercel-nextjs-preview-tarballs'
),
baseUrlArg
,
]
=
process
.
argv
.
slice
(
2
)
]
=
process
.
argv
.
slice
(
2
)
const
baseUrl
=
baseUrlArg
||
'https://vercel-packages.vercel.app/next'
const
repoRoot
=
path
.
resolve
(
__dirname
,
'..'
)
const
repoRoot
=
path
.
resolve
(
__dirname
,
'..'
)
await
fs
.
mkdir
(
tarballDirectory
,
{
recursive
:
true
})
await
fs
.
mkdir
(
tarballDirectory
,
{
recursive
:
true
})
...
@@ -87,13 +89,13 @@ async function main() {
...
@@ -87,13 +89,13 @@ async function main() {
for
(
const
packageInfo
of
packages
)
{
for
(
const
packageInfo
of
packages
)
{
packagesByVersion
.
set
(
packagesByVersion
.
set
(
packageInfo
.
name
,
packageInfo
.
name
,
`
https://vercel-packages.vercel.app/next
/commits/
${
githubHeadSha
}
/
${
packageInfo
.
name
}
`
`
${
baseUrl
}
/commits/
${
githubHeadSha
}
/
${
packageInfo
.
name
}
`
)
)
}
}
for
(
const
nextSwcPackageName
of
nextSwcPackageNames
)
{
for
(
const
nextSwcPackageName
of
nextSwcPackageNames
)
{
packagesByVersion
.
set
(
packagesByVersion
.
set
(
nextSwcPackageName
,
nextSwcPackageName
,
`
https://vercel-packages.vercel.app/next
/commits/
${
githubHeadSha
}
/
${
nextSwcPackageName
}
`
`
${
baseUrl
}
/commits/
${
githubHeadSha
}
/
${
nextSwcPackageName
}
`
)
)
}
}
...
...
scripts/test-new-tests.mjs
View file @
818aa245
...
@@ -14,11 +14,14 @@ async function main() {
...
@@ -14,11 +14,14 @@ async function main() {
const
argv
=
await
yargs
(
process
.
argv
.
slice
(
2
))
const
argv
=
await
yargs
(
process
.
argv
.
slice
(
2
))
.
string
(
'mode'
)
.
string
(
'mode'
)
.
string
(
'group'
)
.
string
(
'group'
)
.
string
(
'preview-builds-base-url'
)
.
boolean
(
'flake-detection'
).
argv
.
boolean
(
'flake-detection'
).
argv
const
testMode
=
argv
.
mode
const
testMode
=
argv
.
mode
const
isFlakeDetectionMode
=
argv
[
'flake-detection'
]
const
isFlakeDetectionMode
=
argv
[
'flake-detection'
]
const
attempts
=
isFlakeDetectionMode
?
3
:
1
const
attempts
=
isFlakeDetectionMode
?
3
:
1
const
previewBuildsBaseUrl
=
argv
[
'preview-builds-base-url'
]
||
'https://vercel-packages.vercel.app/next'
if
(
testMode
&&
!
[
'dev'
,
'deploy'
,
'start'
].
includes
(
testMode
))
{
if
(
testMode
&&
!
[
'dev'
,
'deploy'
,
'start'
].
includes
(
testMode
))
{
throw
new
Error
(
throw
new
Error
(
...
@@ -92,7 +95,7 @@ async function main() {
...
@@ -92,7 +95,7 @@ async function main() {
// PR number endpoint (which resolves the PR to a SHA on every request).
// PR number endpoint (which resolves the PR to a SHA on every request).
const
nextTestVersion
=
const
nextTestVersion
=
testMode
===
'deploy'
testMode
===
'deploy'
?
`
https://vercel-packages.vercel.app/next
/commits/
${
commitSha
}
/next`
?
`
${
previewBuildsBaseUrl
}
/commits/
${
commitSha
}
/next`
:
undefined
:
undefined
if
(
nextTestVersion
)
{
if
(
nextTestVersion
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment