Deploying Docs to Cloudflare Pages
AramDungeons docs deploy automatically through .github/workflows/deploy-docs.yml. Pushes that touch docs/ build Astro/Starlight site, then upload docs/dist to Cloudflare Pages.
One-Time Cloudflare Setup
- Create Cloudflare Pages project named
aramdungeons-docs. - In GitHub repo settings, add secret
CLOUDFLARE_API_TOKEN. - Add secret
CLOUDFLARE_ACCOUNT_ID.
Token should have at least these permissions:
Cloudflare Pages:EditAccount Settings:Read
Build Details
- Workflow installs Bun
1.1.20because docs app pins that package manager version. - Build command is
bun run build. - Astro outputs static files to
docs/dist. - Static Astro/Starlight deploy does not need Cloudflare adapter.
Branch Behavior
- Pushes to default production branch deploy production docs.
- Pushes to other branches deploy branch previews because workflow passes
--branch=${github.ref_name}to Wrangler.
If Project Name Differs
Edit this line in workflow:
command: pages deploy docs/dist --project-name=aramdungeons-docs --branch=${{ github.ref_name }}Replace aramdungeons-docs with real Cloudflare Pages project name.