Deployment Guide¶
This guide covers deploying both the PyRST application and documentation to GitHub Pages.
Architecture¶
The deployment combines both the app and docs into a single GitHub Pages site:
https://rst.scriptr.dev/
├── / # Main PyRST application (from src/pyrst/)
│ ├── index.html
│ ├── app.js
│ ├── main.py
│ └── ...
└── /docs/ # Sphinx documentation (built from docs/)
├── index.html
├── api.html
├── features.html
└── ...
Local Testing¶
Build and Preview Locally¶
# Build the complete site (app + docs)
make site-build
# Build and serve the complete site
make serve
Then visit:
Build Only Documentation¶
# Build docs with live reload
make docs-serve
# Build docs once
make docs-build
GitHub Actions Deployment¶
The deployment is automated via .github/workflows/deploy.yml which:
Builds on every push to main
Builds documentation using Sphinx
Copies app files from
src/pyrst/Combines both into
_site/directoryDeploys to GitHub Pages
Workflow Trigger¶
The workflow runs:
On every push to
mainbranchOn manual trigger via GitHub Actions UI
Build Process¶
- Build documentation → _site/docs/
- Copy app files → _site/
- Add .nojekyll file
- Upload to GitHub Pages
GitHub Pages Configuration¶
Required Settings¶
Repository Settings → Pages:
Source: GitHub Actions
Custom domain:
rst.scriptr.dev
Cloudflare DNS:
Already configured:
rst.scriptr.devCNAME →jacobcoffee.github.io
First Deployment¶
After pushing changes to main:
GitHub Actions will automatically trigger
Check workflow status at: https://github.com/JacobCoffee/pyrst/actions
Once deployed, verify:
Alternative: Separate Subdomain for Docs¶
If you want docs on a separate subdomain like docs.rst.scriptr.dev:
Option 1: GitHub Pages (Same Repo)¶
Add Cloudflare CNAME:
docs.rst.scriptr.dev → jacobcoffee.github.ioUpdate workflow to deploy to subdomain:
- name: Configure custom domain run: echo "docs.rst.scriptr.dev" > _site/docs/CNAME
Note
GitHub Pages only supports one custom domain per repo, so this would replace the main domain.
Option 2: Separate Repo (Recommended for Subdomain)¶
Create new repo:
pyrst-docsMove docs to new repo
Configure GitHub Pages for new repo with custom domain
docs.rst.scriptr.devAdd Cloudflare CNAME:
docs.rst.scriptr.dev → jacobcoffee.github.io/pyrst-docs
Option 3: Cloudflare Pages (Alternative)¶
Deploy docs separately to Cloudflare Pages:
Connect repo to Cloudflare Pages
Build command:
make docs-buildOutput directory:
docs/_build/htmlCustom domain:
docs.rst.scriptr.dev
This allows both:
rst.scriptr.dev→ GitHub Pages (app)docs.rst.scriptr.dev→ Cloudflare Pages (docs)
Recommended Setup¶
Current (Simplest):
✅ App at https://rst.scriptr.dev/
✅ Docs at https://rst.scriptr.dev/docs/
✅ Single deployment workflow
✅ Single GitHub Pages site
Benefits:
Simple CI/CD
Single workflow to maintain
Docs always in sync with app version
No additional DNS configuration
Manual Deployment¶
If needed, you can manually deploy:
# Build the site
make site-build
# The _site/ directory contains everything
# You can upload this to any static host:
# - GitHub Pages
# - Netlify
# - Vercel
# - Cloudflare Pages
# - AWS S3 + CloudFront
Troubleshooting¶
Build Failures¶
Check GitHub Actions logs: https://github.com/JacobCoffee/pyrst/actions
Common issues:
Missing dependencies: Check
pyproject.tomlSphinx warnings: Check
docs/conf.pyPermission errors: Verify workflow permissions
Local Build Issues¶
# Clean all build artifacts
make docs-clean
# Rebuild
make site-build
404 on Deployed Site¶
Verify GitHub Pages is enabled
Check custom domain configuration
Wait 5-10 minutes for DNS propagation
Check
.nojekyllfile exists in_site/
Updating Documentation¶
Edit docs in
docs/*.rstTest locally:
make docs-serveCommit and push to
mainGitHub Actions automatically deploys
Links¶
Live App: https://rst.scriptr.dev/
Live Docs: https://rst.scriptr.dev/docs/
GitHub Repo: https://github.com/JacobCoffee/pyrst
GitHub Actions: https://github.com/JacobCoffee/pyrst/actions