Skip to content
Skills Library
DevOps & cloud · Automation

okhp3-vite-github-pages

/okhp3-vite-github-pages

OverKill Hill P³ Vite-to-GitHub-Pages deployment runbook. Use when deploying or troubleshooting this React/Vite app, its Actions workflow, /abrahamic-reference-engine/ production base, BrowserRouter basename fallback, dist artifacts, build validation, or Pages environment variables. Also activate for subpath asset failures or SPA refresh diagnosis. Do not use for gh-pages branches, backend hosting, or unrelated UI work.

Author
OKHP3 ↗
Repository
skillz ↗
Licence
MIT
Last repository change
25.10.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
3
Scripts
0
HTML comments
0
URLs in SKILL.md
8
Deprecation

No signals detected. Repository changed on 25.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

OverKill Hill P³ Vite-to-GitHub-Pages deployment runbook. Use when deploying or troubleshooting this React/Vite app, its Actions workflow, /abrahamic-reference-engine/ production base, BrowserRouter basename fallback, dist artifacts, build validation, or Pages environment variables. Also activate for subpath asset failures or SPA refresh diagnosis. Do not use for gh-pages branches, backend hosting, or unrelated UI work.

Original author description

OverKill Hill P³ Vite-to-GitHub-Pages deployment runbook. Use when deploying or troubleshooting this React/Vite app, its Actions workflow, /abrahamic-reference-engine/ production base, BrowserRouter basename fallback, dist artifacts, build validation, or Pages environment variables. Also activate for subpath asset failures or SPA refresh diagnosis. Do not use for gh-pages branches, backend hosting, or unrelated UI work.

How it works

  1. Scope
  2. Project contract
  3. Workflow
  4. Gotchas
  5. Output contract
  6. About
Original SKILL.md headings · 69 lines, 602 words
SKILL.md preview
---
name: okhp3-vite-github-pages
description: "OverKill Hill P³ Vite-to-GitHub-Pages deployment runbook. Use when deploying or troubleshooting this React/Vite app, its Actions workflow, /abrahamic-reference-engine/ production base, BrowserRouter basename fallback, dist artifacts, build validation, or Pages environment variables. Also activate for subpath asset failures or SPA refresh diagnosis. Do not use for gh-pages branches, backend hosting, or unrelated UI work."
license: MIT
metadata:
  author: Jamie Hill (OverKill Hill P³)
  version: "1.1.0"
  category: deployment
  origin: okhp3/skillz
  homepage: https://overkillhill.com
  author-github: https://github.com/OKHP3
  in_scope: "Deployment and repair of React or Vue Vite SPAs on GitHub Pages, including base paths and router behavior."
  out_of_scope: "Unapproved publication, unrelated application redesign, or credential and repository administration."
---

# okhp3-vite-github-pages

**OverKill Hill P³** · [overkillhill.com](https://overkillhill.com) · [github.com/OKHP3](https://github.com/OKHP3)

Use this focused runbook to keep the Abrahamic Reference Engine compatible with its client-only Vite build and GitHub Pages Actions deployment. Verify the repository before relying on any remembered version or workflow detail.

## Scope

| In scope | Out of scope |
| --- | --- |
| `vite.config.ts`, `.github/workflows/deploy-pages.yml`, production base paths, `BrowserRouter`, build artifacts, Pages permissions/artifacts, environment wiring, and deployment diagnosis | Servers, databases, backend proxies, `gh-pages` branches, the legacy `npm run deploy`, secret creation, commits, pushes, and unrelated application changes |

## Project contract

Treat these current facts as constraints, then re-read the files if the task may have changed them:

- `vite.config.ts` sets `base` to `/abrahamic-reference-engine/` when `command === 'build'` and `/` otherwise. The dev server listens on `0.0.0.0:5000`.
- `src/App.tsx` uses `BrowserRouter` with `basename={import.meta.env.BASE_URL.replace(/\/$/, '')}`.
- `.github/workflows/deploy-pages.yml` runs on pushes to `main` or manual dispatch, uses Pages permissions and concurrency, installs with `npm ci`, builds with `npm run build`, copies `dist/index.html` to `dist/404.html`, uploads `dist`, and deploys with the Pages actions.
- No environment variables are passed to the Vite build at this time.

## Workflow

### 1. Plan

Read `AGENTS.md`, `vite.config.ts`, `.github/workflows/deploy-pages.yml`, `package.json`, `src/App.tsx`, and the relevant recent diff. Check `git status --short`. Classify the request as configuration, workflow, artifact, or diagnosis before editing. Do not change deployment settings merely because a validation command succeeds.

### 2. Validate the source of truth

Confirm the intended repository name, Pages base, router, build script, artifact path, trigger branch, environment variables, permissions, and fallback behavior from the files. If the requested result conflicts with the client-only boundary or the checked-in workflow, stop and report the conflict.

### 3. Execute safely

Make the smallest compatible edit. Keep the production base exactly `/abrahamic-reference-engine/`, local development at `/`, `BrowserRouter` with basename, npm, and Actions-based Pages deployment. Never place OAuth/API secrets in source, workflow text, or skill output; reference GitHub secrets by name only. Do not create a `gh-pages` branch or add a server workaround for an SPA that already handles routing via the 404.html fallback.

### 4. Validate

Run `npm run build` for build-affecting changes. Inspect the generated `dist/index.html` for `/abrahamic-reference-engine/` asset URLs and confirm the workflow creates `dist/404.html` after the build. For workflow-only edits, inspect YAML structure and still run the narrowest available checks.

### 5. Report

Summarize changed files, verified local results, expected Actions behavior, required repository/environment configuration, and unresolved risks. Distinguish a successful local build from a verified live Pages deployment; the latter requires an actual environment smoke test.

## Gotchas

- A wrong production `base` causes asset 404s under the repository subpath; do not “fix” this by changing the router to `BrowserRouter`.
- A successful Vite build does not prove Pages permissions, secrets, CORS, or deployed behavior are healthy.
- If environment variables are ever added to the Vite build, pass them via GitHub Actions secrets and never print or hard-code their values.
- Preserve `npm ci` and the checked-in lockfile. Do not switch to pnpm or `npm install` as a workaround.
- Do not claim `dist/404.html` exists from a local build unless the copy step was actually run; it is created by the workflow.

## Output contract

Return:

1. deployment diagnosis or implementation summary;
2. exact files and invariants preserved;
3. validation commands/results and any blocked checks;
4. required GitHub/Pages environment configuration without secret values;
5. live-verification status and remaining risks.

## About

Built by [Jamie Hill](https://overkillhill.com) · [OverKill Hill P³](https://overkillhill.com)
Published at [github.com/OKHP3](https://github.com/OKHP3)
Part of the [OKHP3/skillz](https://github.com/OKHP3/skillz) Agent Skill library.
MIT License -- free to use, fork, and adapt. A nod to the source is appreciated.
Files in this package (3)
  • SKILL.md 5 KB
  • agents/openai.yaml 1 KB
  • evals/evals.json 2 KB

Versions

The database has no other skills named okhp3-vite-github-pages.

Identical content appears in 1 other GitHub folders. We show one copy with the highest score.

Database snapshot: 13.11.2026 · package version ee14c540afed (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100protowiki-deploy
    How to build and deploy ProtoWiki to GitHub Pages — production deploy, PR preview deployments on gh-pages, template-first repo setup, base path (PROTOWIKI_BASE), SPA 404 fallback, and CI workflows. Use when asked to deploy, publish, preview a PR, ship to GitHub Pages, set up a…
  • 100aws-spa-deploy
    Use this skill whenever the user is deploying a React/Vite single-page app to AWS, or mentions Amplify Hosting, amplify.yml, CDK, Lambda function URLs, or wiring up Lambda + API Gateway for a frontend. Covers Amplify hosting (SPA rewrites, build cache, Node version, security…
  • 100github-pages-publish
    Publish or update a static site (gh-pages) on GitHub Pages via GitHub Actions in any repo: text or pre-built HTML in, workflow set up, live URL verified. Don't use for CI test pipelines, framework/SSG builds, or Netlify/Vercel hosting.
  • 90github-actions
    GitHub Actions workflow patterns for React Native iOS simulator and Android emulator cloud builds with downloadable artifacts. Use when setting up CI build pipelines or downloading GitHub Actions artifacts via gh CLI and GitHub API.
  • 100github-pages
    Complete GitHub Pages deployment and management system. Static site hosting with Jekyll, custom domains, and GitHub Actions. USE WHEN user mentions 'github pages', 'deploy static site', 'host website on github', 'jekyll site', 'custom domain for github', OR wants to publish a…
  • 100vite-react-best-practices
    Comprehensive React 19 and Vite 8 SPA performance, architecture, and deployment guidelines. Use this skill when building, reviewing, or refactoring React applications built with Vite (SPA). Covers Vite 8 build and static hosting requirements, React Router 8 route-level code…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.