Add static export + cross-repo deploy to github.io (redesign phase 4)

Wire MiTerm (canonical) to publish its static export into Mihir-Null.github.io,
which serves GitHub Pages (nullis.me) from docs/.

- package.json: `export` script (next build && next export -o out) that also
  regenerates the résumé mirrors via prebuild.
- public/CNAME (nullis.me) + public/.nojekyll so the export is Pages-ready.
- .github/workflows/deploy.yml: on push to main / manual dispatch, build and
  publish ./out to github.io/docs via peaceiris/actions-gh-pages.
- docs/decisions/0002-deploy-topology.org: records the topology and the one
  operational dependency — the GH_PAGES_DEPLOY_TOKEN secret the user must add.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nt6ycjAMdUMqGTGtbKocrs
pull/59/head
Claude 3 weeks ago
parent 2914f8dc02
commit c899de346e
No known key found for this signature in database

@ -0,0 +1,39 @@
# Build the static export and publish it to the Mihir-Null.github.io repo,
# which serves GitHub Pages (custom domain nullis.me) from its docs/ folder.
# MiTerm is the canonical source; github.io holds build output only.
#
# REQUIRED SECRET: GH_PAGES_DEPLOY_TOKEN
# A fine-grained PAT (or classic repo-scoped token) with Contents: write on
# Mihir-Null/Mihir-Null.github.io. Add it under this repo's
# Settings → Secrets and variables → Actions. Until it is set, the deploy job
# fails (harmlessly — it only runs on main); the site keeps serving the last
# published build. See docs/decisions/0002-deploy-topology.org.
name: deploy
on:
push:
branches: [main]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build static export (regenerates resume.json + resume.html first)
run: yarn export
- name: Publish to github.io/docs
uses: peaceiris/actions-gh-pages@v4
with:
personal_token: ${{ secrets.GH_PAGES_DEPLOY_TOKEN }}
external_repository: Mihir-Null/Mihir-Null.github.io
publish_branch: main
publish_dir: ./out
destination_dir: docs
cname: nullis.me
full_commit_message: 'Deploy from MiTerm ${{ github.sha }}'

@ -0,0 +1,43 @@
:PROPERTIES:
:ID: 97d6eebf-f0a1-4001-a30f-9c06d01a1f3c
:END:
#+TITLE: ADR 0002 — Deploy Topology: MiTerm → github.io
#+FILETAGS: :adr:miterm:deploy:
Status: accepted (2026-07-16)
Deciders: Mihir Talati (navigator), agent (driver)
* Context
ADR 0001 set MiTerm as the canonical app and Mihir-Null.github.io as build
output only. The site is served by GitHub Pages from ~Mihir-Null.github.io~'s
~docs/~ folder on ~main~, at the custom domain nullis.me.
* Decision
MiTerm builds a static export (~yarn export~~out/~) and a GitHub Action
publishes it into ~Mihir-Null.github.io/docs~ on every push to ~main~. The
github.io repo keeps only served artifacts (~docs/~, ~CNAME~, ~.well-known/~,
~LICENSE~, ~README~); its former Next.js source is removed.
- Mechanism: ~.github/workflows/deploy.yml~ uses
~peaceiris/actions-gh-pages@v4~ with ~external_repository~, publishing
~./out~ to ~docs/~ and writing ~CNAME: nullis.me~.
- The résumé mirrors (resume.json, public/resume.html) regenerate during
~yarn export~ via ~prebuild~, so a deploy always reflects resume.org.
* Operational dependency (ACTION REQUIRED)
The cross-repo push needs a token MiTerm's Actions can use:
- Create a fine-grained PAT with *Contents: write* on
Mihir-Null/Mihir-Null.github.io (or a classic repo-scoped token).
- Add it to MiTerm under Settings → Secrets and variables → Actions as
~GH_PAGES_DEPLOY_TOKEN~.
- Confirm Pages on github.io is set to *Deploy from a branch → main → /docs*.
Until the secret exists the deploy job fails harmlessly; the last published
build keeps serving.
* Consequences
- One source, one deploy path; the github.io repo stops drifting because it no
longer holds source.
- A one-time manual export seeded github.io/docs with the redesigned build so
the change is reviewable without waiting on the token.
- Vercel config (~vercel.json~) is retained for optional preview deploys of the
canonical app; it does not affect the nullis.me production path.

@ -14,6 +14,7 @@
"predev": "yarn resume:build",
"dev": "next dev",
"build": "next build",
"export": "next build && next export -o out && touch out/.nojekyll",
"start": "next start",
"lint": "next lint",
"prepare": "husky install"

@ -0,0 +1 @@
nullis.me
Loading…
Cancel
Save