Static sites are the easiest thing to deploy well: build once, ship the files, done. GitHub Actions makes that automatic on every push.
The shape of the workflow
Install dependencies, build the export, then upload and deploy the output folder.
- uses: actions/checkout@v4
- run: corepack enable && pnpm install --frozen-lockfile
- run: pnpm build
- uses: actions/upload-pages-artifact@v3
with:
path: ./outKeep it fast
- Cache the package store so installs are near-instant.
- Pin action versions for reproducible runs.
- Fail the build on lint errors so problems never reach production.
Because the output is just static files, a deploy is atomic and a rollback is one revert away.
Fixing commit authorship
Migrated repos sometimes carry the wrong author on past commits. This script rewrites authorship across history: