Deploy website to GitHub Pages

This commit is contained in:
2026-08-26 20:06:52 -04:00
parent 0c17689368
commit 96d152f592
6 changed files with 87 additions and 12 deletions
+65
View File
@@ -0,0 +1,65 @@
name: Deploy to GitHub Pages
on:
push:
branches: [master]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.14
- name: Configure GitHub Pages
uses: actions/configure-pages@v5
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Check source
run: bun run check
- name: Prepare static-only routes
run: |
rm -f src/proxy.ts
rm -rf src/app/api src/app/login
rm -rf "src/app/(marketing)/beta"
rm -rf "src/app/(marketing)/executive-summary"
rm -rf "src/app/(marketing)/landscape"
- name: Build static site
run: bun run build
env:
GITHUB_PAGES: "true"
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v4
with:
path: ./out
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
+7
View File
@@ -65,6 +65,13 @@ bun run build
bun run start
```
## GitHub Pages
Pushes to `master` also publish a static build to GitHub Pages through
`.github/workflows/deploy-pages.yml`. The Pages build keeps the public product
site and partner materials, while omitting the optional server-only password
gate and legacy redirect routes that cannot run on static hosting.
Screenshots live in `public/screenshots/`. Every route uses the same fresh,
precomposited iPhone 17 Pro assets in
`public/screenshots/product-bezel-2026-08-24-unified-type/`; there are no raw or
+9
View File
@@ -4,10 +4,19 @@
*/
import "./src/env.js";
const isGitHubPages = process.env.GITHUB_PAGES === "true";
/** @type {import("next").NextConfig} */
const config = {
...(isGitHubPages
? {
output: "export",
trailingSlash: true,
}
: {}),
images: {
qualities: [75, 92],
unoptimized: isGitHubPages,
},
};
+1
View File
@@ -0,0 +1 @@
+2
View File
@@ -1,5 +1,7 @@
import type { MetadataRoute } from "next";
export const dynamic = "force-static";
export default function robots(): MetadataRoute.Robots {
return {
rules: {
+3 -12
View File
@@ -14,11 +14,7 @@
"noUncheckedIndexedAccess": true,
"checkJs": true,
/* Bundled projects */
"lib": [
"dom",
"dom.iterable",
"ES2022"
],
"lib": ["dom", "dom.iterable", "ES2022"],
"noEmit": true,
"module": "ESNext",
"moduleResolution": "Bundler",
@@ -32,9 +28,7 @@
/* Path Aliases */
"baseUrl": ".",
"paths": {
"~/*": [
"./src/*"
]
"~/*": ["./src/*"]
}
},
"include": [
@@ -46,8 +40,5 @@
".next/types/**/*.ts",
".next/dev/types/**/*.ts"
],
"exclude": [
"node_modules",
"generated"
]
"exclude": ["node_modules", "generated", "out"]
}