Deploying Docs to Cloudflare Pages
The documentation site is deployed to Cloudflare Pages at sailpoint-docs.pages.dev.
Prerequisites
-
Cloudflare Wrangler installed and authenticated:
npm install -g wrangler
wrangler login # opens browser for OAuth
wrangler whoami # verify authOr via Just:
just cf-login
just cf-whoami -
Cloudflare Pages project created (one-time setup):
cd site
wrangler pages project create sailpoint-docs --production-branch main
Deploy
Build and deploy in one command:
just docs-deploy
This runs npm run build in site/ (which also generates llms.txt and llms-full.txt), then deploys the build/ directory to Cloudflare Pages.
Manual Steps
# 1. Build the site
cd site
npm run build
# 2. Deploy to Cloudflare Pages
wrangler pages deploy build --project-name sailpoint-docs
URLs
| URL | Description |
|---|---|
https://sailpoint-docs.pages.dev | Production (main branch) |
https://<branch>.sailpoint-docs.pages.dev | Branch preview |
https://<hash>.sailpoint-docs.pages.dev | Specific deployment |
Every push to a branch gets its own preview URL automatically.
CI/CD (GitHub Actions)
To deploy automatically on push, add this workflow:
# .github/workflows/deploy-docs.yml
name: Deploy Docs
on:
push:
branches: [main]
paths: ['site/**']
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- run: cd site && npm ci && npm run build
- uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
workingDirectory: site
command: pages deploy build --project-name sailpoint-docs
Create a CLOUDFLARE_API_TOKEN secret in your GitHub repo settings. Use a token with Cloudflare Pages: Edit permission (see Cloudflare Wrangler docs).
Configuration
The Wrangler config is at site/wrangler.toml:
name = "sailpoint-docs"
pages_build_output_dir = "build"
The Docusaurus config sets the production URL in site/docusaurus.config.ts:
url: 'https://sailpoint-docs.pages.dev',
Update this if you add a custom domain.
Custom Domain
To use a custom domain:
- Go to Cloudflare Dashboard > Pages > sailpoint-docs > Custom domains
- Add your domain (e.g.,
docs.example.com) - Update
urlindocusaurus.config.tsto match - Redeploy:
just docs-deploy