aktin / aktin/aktin-github-handbook

Create GitHub Actions workflow for GitHub Pages deployment

Offen
#5 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
Keine Sprachdaten
Sterne
0
Forks
0
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

## Goal

Every push to `main` builds the site and publishes it on GitHub Pages. No manual steps after a merge.

## Current state

`.github/workflows/deploy-docs.yml` exists (generated by the VuePress scaffold) but cannot work as it is:

- It only triggers on `workflow_dispatch` (manual start).
- It deploys `src/.vuepress/dist`, but this repository uses `docs/` as source directory, so the build output is `docs/.vuepress/dist`.
- GitHub Pages is not enabled for the repository yet.
- `config.js` has no `base`, so all absolute links break under the project sub path (see #4).

## Tasks

- [ ] Fix the workflow: trigger on `push` to `main` and keep `workflow_dispatch` for manual runs. Build with `npm run docs:build`, create `docs/.vuepress/dist/.nojekyll`, deploy `docs/.vuepress/dist` to branch `gh-pages` with `JamesIves/github-pages-deploy-action@v4` (already in the file). Alternative: the official `actions/upload-pages-artifact` and `actions/deploy-pages` pair. Pick one.
- [ ] Enable GitHub Pages in Settings > Pages. Source depends on the chosen action: branch `gh-pages` (root) or "GitHub Actions".
- [ ] Set `base` in `docs/.vuepress/config.js` to match the final URL (see #4).
- [ ] Run the workflow once manually, open the published site and click through sidebar, images and search. Check the browser console for 404s.
- [ ] Add the site URL to the repository description (About) and to `README.md`.

Notes:

- `.env` is committed, so the version variables are available in CI without extra configuration.
- `corepack enable` in the current workflow is not needed with npm and can be removed.
- `NODE_OPTIONS: --max_old_space_size=8192` is harmless, keep it.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.