GitHub Actions & Pages Pipeline
Context
Implementation of a CI/CD pipeline to automate the deployment of VitePress documentation to GitHub Pages.
Observed Issues
- Permission Denied (sh: 1: vitepress): Occurred because
node_moduleswere being tracked by Git from a Windows environment, losing execution bits (+x) when running on the Linux Runner. - HttpError 404: The GitHub Pages deployment failed because the repository was not configured to accept deployments via "GitHub Actions".
Actions Taken
- Repository Cleanup: Created a
.gitignoreto excludenode_modulesand other build artifacts. Removed tracked files from the index usinggit rm -r --cached. - Settings Adjustment: Changed GitHub Pages source from "Deploy from a branch" to "GitHub Actions".
- VitePress Configuration: Added the
baseproperty toconfig.mtsto match the repository's subpath (/trust-vote-ai/).
Outcomes
- Fully automated deployment on every
pushto themainbranch. - Repository hygiene restored (no heavy dependencies in the remote).
- Site live and styled at:
https://hsc00.github.io/trust-vote-ai/