aktin / aktin/aktin-github-handbook

Create GitHub Actions workflow for GitHub Pages deployment

Đang mở
#5 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
0
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

## 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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.