You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Push to `main`| GitHub Pages | N/A |`richardthe3rd.github.io/...`| Development |
15
34
16
35
## Prerequisites
17
36
@@ -21,32 +40,36 @@ The app has two deployment targets:
21
40
22
41
## Cloudflare Configuration
23
42
24
-
### 1. Create Cloudflare Pages Project
43
+
### 1. Create Cloudflare Pages Projects
44
+
45
+
You need **two separate Cloudflare Pages projects**:
46
+
-`cambeerfestival` (production)
47
+
-`cambeerfestival-staging` (staging/previews)
25
48
26
-
**Option A: Let GitHub Actions Create the Project (Easiest)**
49
+
**Option A: Let GitHub Actions Create the Projects (Easiest)**
27
50
28
-
The GitHub Actions workflow will automatically create the Cloudflare Pages project on the first deployment. You can skip this step and jump to step 2 (Get Account ID) and step 3 (Create API Token).
51
+
Both projects will be automatically created on their first deployment. You can skip this step and jump to step 2 (Get Account ID) and step 3 (Create API Token).
29
52
30
-
When the workflow runs, it will create a project named `cambeerfestival` automatically.
53
+
- First push to `main` will create `cambeerfestival-staging`
54
+
- First git tag will create `cambeerfestival`
31
55
32
-
**Option B: Create Project Manually**
56
+
**Option B: Create Projects Manually**
33
57
34
-
If you prefer to create the project manually first:
58
+
If you prefer to create the projects manually first:
35
59
60
+
**For Production Project:**
36
61
1. Log in to [Cloudflare Dashboard](https://dash.cloudflare.com/)
37
62
2. Navigate to **Workers & Pages**
38
-
3. Click **Create application** or **Create**
39
-
4. Choose **Pages** tab
40
-
5. Click **Connect to Git** (you can set this up or skip automatic deployments)
41
-
- OR use **Upload assets** if available
42
-
6. If using Connect to Git:
43
-
- You can connect to your repository but disable automatic deployments
44
-
- GitHub Actions will handle deployments instead
45
-
7. Set **Project name**: `cambeerfestival`
63
+
3. Click **Create application** → **Pages**
64
+
4. Set **Project name**: `cambeerfestival`
65
+
5. Disable automatic deployments (GitHub Actions will handle deployments)
46
66
47
-
**Important**: The project name must be `cambeerfestival` to match the workflow configuration.
67
+
**For Staging Project:**
68
+
1. In **Workers & Pages**, click **Create application** → **Pages**
69
+
2. Set **Project name**: `cambeerfestival-staging`
70
+
3. Disable automatic deployments
48
71
49
-
**Note**: With GitHub Actions using `cloudflare/pages-action@v1`, the project will be created automatically on first deployment if it doesn't exist. Manual creation is optional.
72
+
**Important**: Project names must match the workflow configuration (`cambeerfestival` and `cambeerfestival-staging`).
50
73
51
74
### 2. Get Cloudflare Account ID
52
75
@@ -92,24 +115,51 @@ You can reuse the same token by adding Pages permissions to it:
92
115
93
116
**Note**: Using a single token with both Workers and Pages permissions is simpler and follows the principle of consolidating CI/CD credentials for the same application.
94
117
95
-
### 4. Configure Custom Domain
118
+
### 4. Configure Custom Domains
119
+
120
+
You need to configure **one custom domain per project**:
121
+
122
+
#### 4a. Production Project Domain
96
123
97
124
1. In Cloudflare Dashboard, go to **Workers & Pages** → **Pages**
98
-
2. Select your `cambeerfestival` project
99
-
3. Go to **Custom domains** tab
100
-
4. Click **Set up a custom domain**
101
-
5. Enter: `cambeerfestival.app`
102
-
6. Click **Continue**
103
-
7. Cloudflare will automatically configure the DNS records
104
-
8. Optionally add `www.cambeerfestival.app` as well
125
+
2. Select the **`cambeerfestival`** project
126
+
3. Go to **Settings** → **Builds & deployments**
127
+
4. Set **Production branch** to: `release`
128
+
5. Go to **Custom domains** tab
129
+
6. Click **Set up a custom domain**
130
+
7. Enter: `cambeerfestival.app`
131
+
8. Click **Continue**
132
+
9. Cloudflare will automatically configure the DNS records
133
+
134
+
#### 4b. Staging Project Domain
135
+
136
+
1. In Cloudflare Dashboard, go to **Workers & Pages** → **Pages**
137
+
2. Create or select the **`cambeerfestival-staging`** project
138
+
3. Go to **Settings** → **Builds & deployments**
139
+
4. Set **Production branch** to: `main`
140
+
5. Go to **Custom domains** tab
141
+
6. Click **Set up a custom domain**
142
+
7. Enter: `staging.cambeerfestival.app`
143
+
8. Click **Continue**
144
+
9. Cloudflare will automatically configure the DNS records
145
+
146
+
**Note**: The `cambeerfestival-staging` project will be automatically created by GitHub Actions on the first deployment if it doesn't exist.
147
+
148
+
#### 4c. Optional: WWW Redirect
149
+
150
+
If you want `www.cambeerfestival.app` to redirect to the apex domain:
151
+
1. In the `cambeerfestival` project, add `www.cambeerfestival.app` as a custom domain
0 commit comments