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
2. Deploys to Cloudflare Pages using wrangler-action
98
+
3. Creates stable branch URL for consistent preview access
99
99
4. Comments preview URL on the PR
100
100
5. Updates comment on subsequent pushes
101
101
@@ -154,25 +154,28 @@ To test the workflow:
154
154
155
155
### Updates
156
156
157
-
- Keep `cloudflare/pages-action` version current
157
+
- Keep `cloudflare/wrangler-action` version current
158
158
- Monitor Cloudflare API changes
159
159
- Update content validation rules as needed
160
160
161
-
## Known Issues & Future Improvements
161
+
## Stable URL Implementation
162
162
163
-
### URL Stability Problem
163
+
### Solution Implemented
164
164
165
-
Currently, Cloudflare's Direct Upload API creates a new deployment hash with each push, resulting in changing preview URLs like:
165
+
The workflow now uses `cloudflare/wrangler-action@v3` which provides stable branch URLs through the `pages-deployment-alias-url` output. This ensures consistent preview URLs for each PR:
-**Branch URL**: Stable per PR (e.g., `https://pr-123.project-name.pages.dev`)
168
+
-**Deployment URL**: Commit-specific for debugging if needed
169
169
170
-
This breaks the ability to bookmark or share stable preview URLs for review purposes.
170
+
### Benefits
171
171
172
-
**Potential Solutions to Investigate:**
172
+
1.**Stable bookmarking**: Preview URLs remain constant across pushes to the same PR
173
+
2.**Better collaboration**: Team members can bookmark and share stable URLs
174
+
3.**Future-proof**: Uses the recommended, actively maintained Cloudflare action
175
+
4.**Enhanced debugging**: Both stable and commit-specific URLs available
173
176
174
-
1.**Force predictable branch naming**: Try using branch names like `pr${{ github.event.pull_request.number }}` and construct expected URLs manually
175
-
2.**Track and reuse first URL**: Store the initial deployment URL and attempt to update the same deployment rather than creating new ones
176
-
3.**Use Cloudflare API directly**: Bypass the GitHub action and use Wrangler CLI or direct API calls for more control over deployment naming
177
+
### Migration Notes
177
178
178
-
**Current Status**: Comment updating works correctly (single comment per PR), but URLs change with each deployment. This is the main remaining issue to solve for optimal user experience.
179
+
- Migrated from deprecated `cloudflare/pages-action@v1` to `cloudflare/wrangler-action@v3`
0 commit comments