Skip to content

PetFolio Documentation with Cloudflare

PetFolio documentation is deployed as a static site, deployment and hosting is managed by Cloudflare Pages. Cloudflare handles automatic deployments and fine grained access controls.

Managing Access

Login Methods

Login Methods are configured in Cloudflare One. The following Login Methods have been assigned to the PetFolio Docs pages site:

  • One-Time PIN (Email):
    • Enabled for selected email addresses:
    • Users receive login code via email
    • No additional configuration needed
  • Google Workspace login:
    • All users within the PetFolio Google Workspace (ie. email@petfolio.uk) will have access and can login via their Google Workspace account.
    • Identity Provider Integration configured with PetFolio Google Workspace

Add/Remove Team Members

With the free tier, can give access to up to 50 team members.

  1. Go to AccessApplications
  2. Click Petfolio Documentation
  3. Go to Policies tab
  4. Edit Team Members policy
  5. Add/remove email addresses
  6. Click Save

Changes take effect immediately.

View Active Sessions

  1. Go to AccessUsers
  2. See active sessions
  3. Revoke access if needed

Audit Logs

  1. Go to LogsAccess
  2. View authentication attempts and access logs

Automatic Deployments

Automatic deployments are handled by Cloudflare using the GitHub integration. Cloudflare will watching for changes to the main branch within the petfolio-fe repository and will trigger a new deployment when changes are made within apps/petfolio-docs/*.

When you push to main branch:

  1. CloudFlare detects the push
  2. Runs build command in apps/petfolio-docs
  3. Deploys to docs.petfolio.uk
  4. Check CloudFlare Pages dashboard for build logs

Pull Request Previews

When you create a PR:

  1. CloudFlare builds a preview deployment
  2. Preview URL generated (visible in CloudFlare dashboard)
  3. Preview protected by same Access authentication
  4. Preview deleted when PR closed/merged

Troubleshooting

Custom domain not working
  • Verify CNAME record in Squarespace points to petfolio-docs.pages.dev
  • Check DNS propagation: https://dnschecker.org
  • Wait up to 30 minutes for DNS changes
  • Ensure SSL certificate is active in CloudFlare Pages
Build failures
  • Check build logs in CloudFlare Pages dashboard
  • Verify requirements.txt is present
  • Ensure PYTHON_VERSION environment variable is set to 3.12
  • Check that mkdocs.yml is valid
Access denied errors
  • Verify user email is in Access policy
  • Check identity provider configuration
  • Review audit logs for detailed errors
  • Test with different email or incognito mode
Can't login
  • Verify One-Time PIN is enabled (default)
  • Check email spam folder for OTP codes
  • Try clearing browser cookies
  • Contact admin to verify email is in policy