Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy Next.js preview canaries with a unique version #66643

Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Document preview tarballs that are created on branches
  • Loading branch information
eps1lon committed Jun 7, 2024
commit 25ae5c6a89f62aa392a1d677dce65698c929cbd5
4 changes: 3 additions & 1 deletion .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,9 @@ jobs:

- run: npm i -g vercel@latest

- run: node ./scripts/deploy-tarball.js
# User docs in contributing/core/testing.md
- name: Deploy Next.js tarball
run: node ./scripts/deploy-tarball.js ${{ github.sha }}

publishRelease:
if: ${{ needs.build.outputs.isRelease == 'true' }}
Expand Down
19 changes: 19 additions & 0 deletions contributing/core/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,22 @@ To run the test suite using Turbopack, you can use the `TURBOPACK=1` environment
```sh
TURBOPACK=1 pnpm test-dev test/e2e/app-dir/app/
```

## Integration testing outside the repository with preview builds

Every branch build will create a tarball of Next.js that can be used in external repositories.
The URL for that tarball is printed at the end of the [`build_and_deploy` workflow](https://github.com/vercel/next.js/actions/workflows/build_and_deploy.yml) in the "Deploy tarball" job in the "Deploy Next.js tarball" step.
Look for a line saying "Next.js tarball: Preview:" e.g.

> Next.js tarball: Preview: https://files-h8qzhplpe-vtest314-next-e2e-tests.vercel.app/next.tgz
> -- https://github.com/vercel/next.js/actions/runs/8239762627/job/22534810077#step:9:34

You can use this preview build in other packages by using that URL instead of a version in the `package.json` e.g.

```json
{
"dependencies": {
"next": "https://files-h8qzhplpe-vtest314-next-e2e-tests.vercel.app/next.tgz"
}
}
```
Loading