Skip to content

GitHub Pages Setup Guide

This document explains how to set up GitHub Pages for FinFocus documentation.

FinFocus documentation is deployed to GitHub Pages from the docs/ directory using Astro Starlight with a Node.js-based build pipeline. This guide shows how to configure the repository for automatic deployment.

  • GitHub repository admin access
  • Main branch with docs/ directory
  • .github/workflows/docs-build-deploy.yml workflow file (included)

Go to your repository settings:

  1. Navigate to SettingsPages
  2. Under “Build and deployment”:
    • Source: Select “GitHub Actions”
    • This enables GitHub Actions to deploy to Pages

Ensure the workflow has permission to deploy:

  1. Go to SettingsActionsGeneral
  2. Under “Workflow permissions”:
    • Select “Read and write permissions”
    • Enable “Allow GitHub Actions to create and approve pull requests”
  3. Click Save

If using a custom domain:

  1. Create a docs/CNAME file with your domain:

    docs.finfocus.com
  2. Configure domain in SettingsPages:

    • Enter your custom domain
    • GitHub will add DNS records instructions
  3. Update DNS records at your domain provider

After push to main:

  1. Go to Actions tab
  2. Look for “Build & Deploy Documentation” workflow
  3. Verify workflow completes successfully
  4. Visit GitHub Pages URL:
    • Default: https://rshade.github.io/finfocus/
    • Custom domain: https://docs.finfocus.com/

Check workflow permissions:

Terminal window
gh api repos/rshade/finfocus/actions/permissions

Check the workflow logs:

  1. Go to Actions tab
  2. Click on failed workflow
  3. Expand “Build Documentation” job
  4. Look for error messages

Common issues:

  • Missing dependencies: Run cd docs && npm ci
  • Astro build errors: Check astro.config.mjs syntax and package.json scripts
  • Link errors: Run make docs-lint locally
  1. Verify workflow is enabled (check .github/workflows/docs-build-deploy.yml exists)
  2. Check that changes are pushed to main branch
  3. Verify docs/ directory changes triggered the workflow
  4. Check workflow logs for failures

If automatic deployment fails, you can deploy manually:

Terminal window
# Build locally
cd docs
npm ci
npm run build
# Upload to GitHub Pages (requires authentication)
# Note: This is rarely needed - use workflows instead

View all deployments:

Terminal window
gh deployment list --repo rshade/finfocus
  1. Go to SettingsPages
  2. View deployment history and status

If you modify the workflow:

Terminal window
# Validate workflow syntax
gh workflow validate .github/workflows/docs-build-deploy.yml
# Push changes
git add .github/workflows/docs-build-deploy.yml
git commit -m "docs: Update GitHub Pages workflow"
git push origin main

  • docs/package.json - Node.js dependencies
  • docs/astro.config.mjs - Astro/Starlight configuration
  • docs/tsconfig.json - TypeScript configuration
  • docs/.markdownlint-cli2.jsonc - Markdown linting
  • .github/workflows/docs-build-deploy.yml - Deployment workflow

To change site configuration:

  1. Edit docs/astro.config.mjs or docs/package.json
  2. Test locally: make docs-serve
  3. Push to main (triggers rebuild)


Last Updated: 2025-10-29