The workflows send the web Storybook and the pull request reports to Cloudflare
Pages. deploy-storybook.yaml sends the Storybook. visual-review.yaml sends
each report.
Do these steps one time.
-
Make the Pages project:
npx wrangler pages project create zingo-visual --production-branch=production -
Get the account ID from the Cloudflare dashboard. Or run
npx wrangler whoami. -
Make an API token. Give the token the
Cloudflare Pages: Editpermission. -
Add two secrets to the GitHub repository:
CLOUDFLARE_API_TOKENCLOUDFLARE_ACCOUNT_ID
- The
devbuild:https://zingo-visual.pages.dev - Each pull request:
https://pr-<number>.zingo-visual.pages.dev
- Keep the token secret. Do not put the token in a file.
- A fork pull request cannot read the secrets. The deploy step stops, but you still get the report as an artifact.
- When a pull request closes, a workflow deletes all its preview deployments.
- To make the pages private, use Cloudflare Access.