Cloudflare Pages
Cloudflare is a popular CDN and DNS provider that also offers a static site hosting service called Cloudflare Pages. Cloudflare Pages can deploy Evidence apps from a Git repository.
Prerequisites
- A Cloudflare account
 - An Evidence project pushed to a Git service like GitHub or GitLab
 
Deploy Evidence to Cloudflare Pages
- Navigate to the Cloudflare dashboard
 - Select Workers & Pages from the left-hand menu, and select Create
 - There are two tabs: Workers and Pages - choose Pages
 - Select Connect to Git, and choose GitHub or GitLab
 - Select Repository
- Authenticate with your Git provider
 - Choose the repository to deploy from
 - You may need to configure repository access permissions
 
 - Set up builds and deployments
- Choose a production branch
 - Set the build command: 
npm run sources && npm run build - Set the build output directory: 
/build 
 - (Optionally select the root path containing your Evidence project if using a monorepo)
 - Add environment variables
- Click Add variable
 - With your Evidence dev server running, go to the settings page and copy each of the environment variables
 - Paste them into the Cloudflare Pages environment variables section
 
 - Click Save and Deploy
 
Your app will be deployed to a URL like https://[repo-name].pages.dev. It can take a few minutes for the site to be available after deployment.
Domains, Authentication and Scheduling
Evidence Cloud
Deploying on Evidence Cloud comes with:
- User authentication with email-password or SSO via Google Workspace, Microsoft Entra, Okta etc.
 - Your own Evidence subdomain, https://[my-subdomain].evidence.app, or custom domain.
 - Scheduled builds to refresh your data at specific intervals, e.g., daily, hourly.
 
Authentication
By default, your app will be public.
Authentication can be configured with Cloudflare Access.
Workers & Pages > [Your app] > Settings > General > Access Policy > Manage
You will need to set up access groups and policies to control access to your app. A one time PIN code can be configured for user login.
Custom Domains
Cloudflare Pages supports custom domains.
Workers & Pages > [Your app] > Custom Domains > Set up a custom domain
Data refresh
Cloudflare Pages does not have built in functionality for data refresh.
 