Publish web reports to Cloudflare Pages
The corresponding project workflow does not commit reports or deploy GitHub Pages. Its built-in online publishing path is Cloudflare Pages. Once configured, every GitHub Actions run uploads that run's generated
index.html report to Cloudflare Pages.Prerequisites
This is an optional follow-up to GitHub Actions, not a separate way to run TrendRadar. First complete the GitHub Actions guide and confirm that it can generate a web report. If you have not chosen a runtime yet, return to Quick Start.
Create a Cloudflare Pages project
Sign in to the Cloudflare Dashboard, then follow this path:
Workers and Pages > Create > Pages > "Upload assets" (direct upload)
Enter a project name (for example
trendradar). Remember this name — you'll need it later when configuring GitHub Secrets.On first creation you need to upload any file to complete project initialization. This file will later be overwritten automatically by GitHub Actions and does not affect the final result.
Tip
The project name determines your access URL. For example, if the project is named trendradar, the URL will be https://trendradar.pages.dev.
Get the API Token and Account ID
API Token
Click your avatar in the top-right corner of the Cloudflare Dashboard, then go to:
My Profile > API Tokens > Create Token > Create Custom Token
In the permissions settings, select:
- Permission: Account > Cloudflare Pages > Edit
Copy the Token once it's created.
The Token is shown only once
The API Token is displayed only once on the creation page and cannot be viewed again after you leave. Be sure to copy and store it safely at this point.
Account ID
You can find the Account ID in either of these places:
- The right sidebar of the Workers and Pages page
- The bottom-right of the Overview page of any domain
Add GitHub Secrets
In your GitHub repository, go to Settings > Secrets and variables > Actions, and add the following 3 Secrets:
| Name | Secret (value) |
|---|---|
CLOUDFLARE_API_TOKEN | The API Token obtained in Step 2 |
CLOUDFLARE_ACCOUNT_ID | Your Cloudflare Account ID |
CLOUDFLARE_PROJECT_NAME | The Cloudflare Pages project name (e.g. trendradar) |
The Name must match exactly
A Secret's Name must match the table above exactly and cannot be renamed. For example, you must write
CLOUDFLARE_API_TOKEN and not CF_TOKEN, otherwise the program won't recognize it.Access URL
Once configured, the next GitHub Actions run will deploy to Cloudflare Pages automatically. After a successful deployment, you can access it at:
https://[project-name].pages.dev
# Example
https://trendradar.pages.devNotes
- Missing Secrets are skipped automatically: if any one of the 3 Secrets is not configured, GitHub Actions automatically skips the Cloudflare deployment step without affecting crawling or push notifications. That run's web report is not automatically preserved on another online site.
- Custom domain: if you have your own domain, you can bind it under Custom domains in the Cloudflare Pages project settings to replace the default
.pages.devaddress. - Deployment timing: deployment is performed automatically by GitHub Actions, and every workflow run updates the content on Cloudflare Pages. You don't need to trigger the deployment manually.