1 Deployment Guide
1.1 Cloudflare Pages Deployment
1.1.1 Setup Process
- Connect GitHub repository to Cloudflare Pages
- Configure build settings:
- Build command:
quarto render - Build output directory:
_site - Root directory:
/(or subdirectory if needed)
- Build command:
1.1.2 Environment Variables
Set these in Cloudflare Pages dashboard:
QUARTO_VERSION=latest
NODE_VERSION=18
1.1.3 Build Configuration
Create .cloudflare/pages.yml:
build:
command: quarto render
output: _site
environment_variables:
QUARTO_VERSION: "latest"
NODE_VERSION: "18"
deployment:
compatibility_date: "2024-01-01"
environment_variables:
NODE_ENV: "production"1.2 Access Control Setup
1.2.1 Cloudflare Access Configuration
- Navigate to Cloudflare Zero Trust dashboard
- Create application for internal docs domain
- Set up authentication:
- Google Workspace SSO
- Email domain verification
- Multi-factor authentication
1.2.2 Access Policies
name: "Internal Documentation Access"
decision: "allow"
rules:
- name: "Team Members"
require:
- email_domain: "yourcompany.com"
- groups: ["developers", "management"]1.3 Automated Deployment
1.3.1 GitHub Actions Workflow
name: Deploy to Cloudflare Pages
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: quarto-dev/quarto-actions/setup@v2
- run: quarto render
- uses: cloudflare/pages-action@1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: internal-docs
directory: _site1.4 Rollback Procedures
1.4.1 Emergency Rollback
- Access Cloudflare Pages dashboard
- Navigate to deployments history
- Click “Rollback” on previous successful deployment
- Verify functionality after rollback
1.4.2 Planned Rollbacks
- Create hotfix branch from previous stable commit
- Deploy through normal CI/CD process
- Monitor for issues
- Document rollback reason and resolution