Skip to content

Commit 62508d9

Browse files
committed
publish
1 parent beb2945 commit 62508d9

File tree

4 files changed

+46
-1
lines changed

4 files changed

+46
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# .github/workflows/deploy.yml
2+
name: Deploy static Next.js to GH Pages
3+
on: { push: { branches: [ main ] } }
4+
permissions: { contents: write }
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- uses: actions/setup-node@v4
11+
with: { node-version: '18', cache: 'pnpm' }
12+
- run: corepack enable
13+
- run: pnpm install --frozen-lockfile
14+
- run: pnpm build && pnpm export
15+
- uses: peaceiris/actions-gh-pages@v3
16+
with:
17+
github_token: ${{ secrets.GITHUB_TOKEN }}
18+
publish_dir: ./out

next.config.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// next.config.ts
2+
import type { NextConfig } from 'next'
3+
4+
const repo = 'expressivity-atlas'
5+
const isProd = process.env.NODE_ENV === 'production'
6+
7+
const nextConfig: NextConfig = {
8+
output: 'export', // static export
9+
basePath: isProd ? `/${repo}` : undefined, // needed for GH Pages subpath
10+
assetPrefix: isProd ? `/${repo}/` : undefined,
11+
images: { unoptimized: true }, // Next/Image needs this when exporting
12+
}
13+
export default nextConfig

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"dev": "next dev --turbopack",
66
"start": "next start",
77
"predeploy": "npm run build",
8-
"deploy": "gh-pages -d out"
8+
"deploy": "gh-pages -d out",
9+
"export": "next export"
910
},
1011
"dependencies": {
1112
"@heroicons/react": "^2.2.0",
@@ -25,6 +26,7 @@
2526
"react": "latest",
2627
"react-dom": "latest",
2728
"react-force-graph-2d": "^1.27.1",
29+
"react-table": "^7.8.0",
2830
"tailwindcss": "3.4.17",
2931
"typescript": "5.7.3",
3032
"use-debounce": "^10.0.4",

pnpm-lock.yaml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)