Skip to content

Commit 3da86a3

Browse files
authored
[framework-boilerplates] Add workflow for prebuilding Next.js boilerplate (#1068)
Shifts from https://github.com/vercel/vercel/blob/main/.github/workflows/faster-template-prebuild-nextjs.yml with appropriate `working-directory` and `secrets` changes.
1 parent cfa2553 commit 3da86a3

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Prebuild Next.js Boilerplate Example
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
inputs:
9+
10+
jobs:
11+
clone-build-deploy:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
token: ${{ secrets.GH_TOKEN_PULL_REQUESTS }}
17+
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: 'lts/*'
21+
22+
- run: |
23+
node --version
24+
npm --version
25+
26+
- run: |
27+
npm install -g vercel@latest
28+
vc --version
29+
30+
- working-directory: ./framework-boilerplates/nextjs
31+
run: |
32+
npm ci
33+
env:
34+
NPM_CONFIG_LOGLEVEL: http
35+
36+
- working-directory: ./framework-boilerplates/nextjs
37+
run: |
38+
vc build --debug --token $VERCEL_TOKEN --yes --prod
39+
env:
40+
VERCEL_PROJECT_ID: prj_qav3SWw0ZQDfehj7w47xPaBESx8P
41+
VERCEL_TOKEN: ${{ secrets.VERCEL_EXAMPLES_TOKEN }}
42+
VERCEL_ORG_ID: ${{ secrets.VERCEL_EXAMPLES_ORG_ID }}
43+
44+
- working-directory: ./framework-boilerplates/nextjs
45+
run: |
46+
vc deploy --debug --token $VERCEL_TOKEN --yes --prod --prebuilt --archive=tgz
47+
env:
48+
VERCEL_PROJECT_ID: prj_qav3SWw0ZQDfehj7w47xPaBESx8P
49+
VERCEL_TOKEN: ${{ secrets.VERCEL_EXAMPLES_TOKEN }}
50+
VERCEL_ORG_ID: ${{ secrets.VERCEL_EXAMPLES_ORG_ID }}

0 commit comments

Comments
 (0)