Cloudflare Pages Setup
- Go to the Cloudflare dashboard and select the account that should own the project.
- Click on the “Compute” dropdown and then select “Workers & Pages” in the left sidebar.
- Click the blue “Create Application” button at the top.
- Select the “Getting Started” at the bottom of the dialogue next to “Looking to deploy Pages?”.
- Click “Get started” under “Drag and drop your files”.
- Provide a name for the project. The subdomain ${PROJECT_NAME}-${suffix}.pages.dev will be used (without
-${suffix}if your name is unique within Cloudflare). - Click “Create project”. At this point, your project has been created, but has no content deployed. Deploy content by either uploading assets or using OMSF static-site-tools!
Advanced Setup Using Terraform/OpenTofu
We have a Terraform/OpenTofu module to complete this process with code.
This module is part of a larger OMSF tool called static-site-tools.
For more information on how it is used, see here.
static-site-tools is used to automate common static site builders and provide a path for multiuser preview URLs and is our recommended workflow for building static sites.