gittydocsgittydocs

GitHub Pages 🚀

Deploy your docs to GitHub Pages.

Local Source

If GITTYDOCS_SOURCE points at a folder in this repo, build then deploy ./dist/client.

GitHub Actions (required for Pages)

Generate a workflow:

npx gittydocs@latest deploy --ghpages

This writes .github/workflows/deploy-gittydocs.yml.

Generated workflow:

name: Deploy Gittydocs (GitHub Pages)
on:
  push:
    branches: [main]
permissions:
  contents: read
  pages: write
  id-token: write
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - uses: oven-sh/setup-bun@v2
      - run: npx gittydocs@latest build "./docs"
      - uses: actions/upload-pages-artifact@v3
        with:
          path: ./dist/client
      - uses: actions/deploy-pages@v4

If your docs folder isn't docs/, update the build path in the workflow.

Enable GitHub Pages in repo settings -> Pages -> Source: GitHub Actions.