File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy Next.js site to Pages
2+
3+ on :
4+ # Runs on pushes targeting the main branch
5+ push :
6+ branches :
7+ - main
8+
9+ # Allows you to run this workflow manually from the Actions tab
10+ workflow_dispatch :
11+
12+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+ permissions :
14+ contents : read
15+ pages : write
16+ id-token : write
17+
18+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20+ concurrency :
21+ group : " pages"
22+ cancel-in-progress : false
23+
24+ jobs :
25+ build :
26+ runs-on : ubuntu-latest
27+ steps :
28+ - name : Checkout
29+ uses : actions/checkout@v4
30+
31+ - name : Install Bun
32+ uses : oven-sh/setup-bun@v2
33+ with :
34+ bun-version : latest
35+
36+ - name : Install dependencies
37+ run : bun install
38+
39+ - name : Setup Pages
40+ id : setup_pages
41+ uses : actions/configure-pages@v5
42+
43+ - name : Restore cache
44+ uses : actions/cache@v4
45+ with :
46+ path : |
47+ .next/cache
48+ # Generate a new cache whenever packages or source files change.
49+ key : ${{ runner.os }}-nextjs-${{ hashFiles('bun.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
50+ # If source files changed but packages didn't, rebuild from a prior cache.
51+ restore-keys : |
52+ ${{ runner.os }}-nextjs-${{ hashFiles('bun.lock') }}-
53+
54+ - name : Build with Next.js
55+ run : bun run build
56+ env :
57+ PAGES_BASE_PATH : ${{ steps.setup_pages.outputs.base_path }}
58+
59+ - name : Upload artifact
60+ uses : actions/upload-pages-artifact@v3
61+ with :
62+ path : ./out
63+
64+ deploy :
65+ environment :
66+ name : github-pages
67+ url : ${{ steps.deployment.outputs.page_url }}
68+ runs-on : ubuntu-latest
69+ needs : build
70+ steps :
71+ - name : Deploy to GitHub Pages
72+ id : deployment
73+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change 11import type { NextConfig } from "next" ;
22
33const nextConfig : NextConfig = {
4- /* config options here */
4+ output : "export" ,
55} ;
66
77export default nextConfig ;
Original file line number Diff line number Diff line change 99 "lint" : " next lint"
1010 },
1111 "dependencies" : {
12+ "next" : " 15.3.3" ,
13+ "postcss" : " ^8.5.5" ,
1214 "react" : " ^19.0.0" ,
13- "react-dom" : " ^19.0.0" ,
14- "next" : " 15.3.3"
15+ "react-dom" : " ^19.0.0"
1516 },
1617 "devDependencies" : {
1718 "typescript" : " ^5" ,
Original file line number Diff line number Diff line change 11const config = {
2- plugins : [ "@tailwindcss/postcss" ] ,
2+ plugins : {
3+ "@tailwindcss/postcss" : { } ,
4+ } ,
35} ;
46
57export default config ;
You can’t perform that action at this time.
0 commit comments