Netlify 🌐
Deploy your docs to Netlify.
Local Source
If GITTYDOCS_SOURCE points at a folder in this repo, build then deploy ./dist/client.
via Netlify (recommended)
Connect the repo in Netlify, then set:
- Build Command:
npx gittydocs@latest build "./docs" - Publish Directory:
dist/client
If your docs folder isn't docs/, update the build path.
via GitHub Actions
Generate a workflow:
npx gittydocs@latest deploy --netlifyThis writes .github/workflows/deploy-gittydocs.yml.
Required GitHub Actions secrets:
NETLIFY_AUTH_TOKENNETLIFY_SITE_ID
Generated workflow:
name: Deploy Gittydocs (Netlify)
on:
push:
branches: [main]
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"
- run: npx netlify-cli@latest deploy --dir="./dist/client" --prod
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}