-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (66 loc) · 2.22 KB
/
Copy pathpages.yml
File metadata and controls
78 lines (66 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Deploy to GitHub Pages
# Builds a static-export variant of the app (no server-side PDF route)
# and deploys it to GitHub Pages on every push to main. The Vercel
# deployment continues to host the full version with PDF export.
#
# Setup (one-time, on the repo): Settings → Pages → "Build and
# deployment" → Source: "GitHub Actions". After the first successful
# run, the site is at https://<user>.github.io/<repo>/.
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
# Allow only one Pages deploy at a time, but don't cancel an in-flight
# deploy mid-upload — we want every push to main to publish.
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Setup Node.js
uses: actions/setup-node@v7
with:
# Node 24 (Krypton) is the current active LTS, EOL 2028-04-30.
# Node 20 went EOL 2026-04-30 and is below the floor declared by
# puppeteer-core and size-limit (engines.node >= 22.12.0), which is
# what the EBADENGINE warnings on every `npm ci` were about.
node-version: 24
cache: npm
- name: Install dependencies
run: npm ci
- name: Strip server-only API routes
# `next export` (output: 'export') refuses to build with route
# handlers in the tree. Delete them; the "Save PDF" button is
# gated on NEXT_PUBLIC_DISABLE_PDF=1 so nothing in the client
# bundle still calls /api/export-pdf.
run: rm -rf src/app/api
- name: Configure Pages
uses: actions/configure-pages@v6
- name: Build static site
env:
BUILD_TARGET: pages
NEXT_PUBLIC_DISABLE_PDF: '1'
run: npm run build
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v5
with:
path: ./out
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5