Skip to main content

Deploying Docs to Cloudflare Pages

The documentation site is deployed to Cloudflare Pages at sailpoint-docs.pages.dev.

Prerequisites

  1. Cloudflare Wrangler installed and authenticated:

    npm install -g wrangler
    wrangler login # opens browser for OAuth
    wrangler whoami # verify auth

    Or via Just:

    just cf-login
    just cf-whoami
  2. 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

URLDescription
https://sailpoint-docs.pages.devProduction (main branch)
https://<branch>.sailpoint-docs.pages.devBranch preview
https://<hash>.sailpoint-docs.pages.devSpecific 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:

  1. Go to Cloudflare Dashboard > Pages > sailpoint-docs > Custom domains
  2. Add your domain (e.g., docs.example.com)
  3. Update url in docusaurus.config.ts to match
  4. Redeploy: just docs-deploy