Skip to content

Commit eac0da7

Browse files
ryan-williamsclaude
andcommitted
Add GitHub Pages deploy workflow and CNAME
- GHA workflow builds from `www/` and deploys to GHP on push to `main` - Strip local-only `scrns` workspace dep before CI install - Skip `tsc` in build (pre-existing type errors in deck.gl/use-prms types) - Add CNAME for `jct.rbw.sh` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent b7e749e commit eac0da7

3 files changed

Lines changed: 77 additions & 1 deletion

File tree

.github/workflows/deploy.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Deploy to GitHub Pages
2+
on:
3+
push:
4+
branches: [main]
5+
paths: ['www/**', '.github/workflows/deploy.yml']
6+
pull_request:
7+
branches: [main]
8+
paths: ['www/**', '.github/workflows/deploy.yml']
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
concurrency:
17+
group: "pages"
18+
cancel-in-progress: false
19+
20+
jobs:
21+
build-and-deploy:
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 10
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- uses: pnpm/action-setup@v4
28+
with:
29+
version: 10
30+
31+
- uses: actions/setup-node@v4
32+
with:
33+
node-version: '22'
34+
cache: 'pnpm'
35+
cache-dependency-path: 'www/pnpm-lock.yaml'
36+
37+
- name: Remove local-only workspace deps
38+
working-directory: ./www
39+
run: |
40+
echo -e 'packages:\n - .' > pnpm-workspace.yaml
41+
node -e "
42+
const p = require('./package.json');
43+
delete p.devDependencies.scrns;
44+
require('fs').writeFileSync('package.json', JSON.stringify(p, null, 2) + '\n');
45+
"
46+
47+
- name: Install dependencies
48+
working-directory: ./www
49+
run: pnpm install --no-frozen-lockfile
50+
51+
- name: Build
52+
working-directory: ./www
53+
run: pnpm run build
54+
55+
- name: Setup Pages
56+
if: github.ref == 'refs/heads/main'
57+
uses: actions/configure-pages@v5
58+
59+
- name: Upload Pages artifact
60+
if: github.ref == 'refs/heads/main'
61+
uses: actions/upload-pages-artifact@v3
62+
with:
63+
path: ./www/dist
64+
65+
deploy:
66+
runs-on: ubuntu-latest
67+
needs: build-and-deploy
68+
if: github.ref == 'refs/heads/main'
69+
environment:
70+
name: github-pages
71+
url: ${{ steps.deployment.outputs.page_url }}
72+
steps:
73+
- name: Deploy to GitHub Pages
74+
id: deployment
75+
uses: actions/deploy-pages@v4

www/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"clean": "rm -rf node_modules/.vite dist",
88
"dev": "vite",
99
"dev:s3": "VITE_PLUGIN_DVC_DEV=s3 vite",
10-
"build": "tsc -b && vite build",
10+
"build": "vite build",
1111
"lint": "eslint .",
1212
"preview": "vite preview",
1313
"screenshot": "scrns -h localhost:3201 -c scrns.config.ts -o public && magick public/og.png -crop 1200x630+0+0 +repage public/og.png"

www/public/CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
jct.rbw.sh

0 commit comments

Comments
 (0)