Part V: Keep These Handy (use them when you need them)D
Appendix D
Appendix D: Every prompt, in reading order
Cut along the dotted line.
Copy-paste ready. Fill in [brackets]. Start with setup and your build path; use the domain and launch prompts when the preview is ready. The vault and automation prompts are optional reference steps.
Step 2: Set up the agent (and let it set up everything else)
Set this computer up so Claude Code can build websites for me with
Cloudflare's cf CLI. Start with a local preview. No domain, API token,
secrets vault or automatic deployment from GitHub before my first build.
1. Check for Node LTS (at least 22.18), git and the GitHub CLI. Install what
is missing. Install Cloudflare's CLI with npm install -g cf. Check its
version and current docs: https://developers.cloudflare.com/cf/
2. For new sites use cf with cloudflare.config.ts. Start with a supported
plain Vite/static site, using React only where it helps the interactions.
Run cf init in the new site folder, review its configuration and pin
the tested cf version in that project. Ignore .cloudflare build output.
3. Build and preview locally before signing in. When I want to save the
code, use GitHub's browser sign-in. When I want to share a Cloudflare
preview, start cf auth login. Tell me which account and permissions to
review, then wait for my approval. Check cf auth whoami afterwards.
Never print or copy login credentials.
4. Add these rules to ~/.claude/CLAUDE.md, preserving existing instructions:
- Use cf for new Cloudflare projects and account tasks. Find unfamiliar
commands with cf cli search, inspect their help/schema, then act.
Keep search queries generic; leave out account names and private data.
- For cf projects, run type checks and tests separately from cf build.
Prove the build with cf deploy --dry-run before an actual deployment.
For an approved framework deployment exception, keep its recorded
build and validation commands through launch and CI.
- Share a workers.dev staging address only when I ask. It is public;
keep it noindex and keep private data out of it.
- Do not buy a domain or change existing domain/email records during
setup. Those are pre-launch tasks. Production waits for my approval.
- Only add a vault when a feature needs service secrets. Never put
secrets in chat, committed files or browser code.
- Ask before adding a paid service. Tell me the actual plan and cost.
- Existing Wrangler projects are a separate case: do not run cf's
project commands against them without a reviewed migration. If a
framework is unsupported, explain the specific limitation first.
Report what is ready for a local build and which sign-ins can wait until
I share the preview. Do not create remote resources in this setup step.Path A: How to build a website with Claude Code
BUSINESS
What you do, in one or two sentences:
Where you are / who you serve:
What makes you different from the three competitors down the road:
VISITORS
Who's landing on this site:
The ONE thing you want them to do (call, book, order, get a quote, visit):
The questions they always ask you before buying:
PAGES
[e.g. Home, Menu, About, Catering, Contact. Or "one long page".]
THE FEEL
Three words for how it should feel (not "modern" and "clean", everyone says
that. Try "warm, flour-dusted, slightly chaotic" or "quiet, expensive, gallery"):
Sites you love (any industry) and what exactly you love about each:
1.
2.
3.
Sites or styles you hate:
Borrowing from someone else's look (a famous brand, a book series, a movie)?
Say "evoke it, don't copy it": no names, logos or characters that aren't yours.
Brand colours / fonts, if you have them (or "make them up"):
MOTION AND INTERACTION
[None / subtle / show off.] Any specific idea? ("the menu could be a
flippable card deck", "the hero reacts to the mouse", "scroll through the
steps of making sourdough")
LANGUAGES
[English only / English and French / ...]
MATERIAL
Everything is in this folder: [path]. Old site: [URL or none].Above is my brief. Build my website.
You're the designer here, not just the developer. Use the brief and the
material in this folder, then make real design decisions: a concept, a type
pairing, a colour system, a layout idea that belongs to THIS business. Push
it. I would rather you take a big swing I have to pull back than hand me
something safe. Write your design direction to DESIGN.md before you build,
and follow it.
Hard no's: generic gradient heroes, "Welcome to [business]" headlines, rows of
three identical cards with icons, emoji as icons, stock-photo people, fake
testimonials, lorem ipsum, and any copy that could be on a competitor's site.
Write real copy from my material, in plain language, specific to me. If you
need a fact you don't have (prices, hours, address), leave a clearly marked
TODO and list them all for me at the end. Don't invent them.
Build it properly:
- A Vite/static site deployed with Cloudflare's cf CLI. Generate real HTML
for each public page so visitors and search engines get the content
without waiting for JavaScript. Use React only for interactions that
benefit from it. I'm on Workers [Free / Paid]; stay within its limits
and tell me before adding anything that needs Paid.
- Configure this new project with cf init and cloudflare.config.ts. Pin
the tested cf version and commit the lockfile. Keep the configuration
in the repo, with .cloudflare output and secrets ignored.
- Keep all the words and data in Markdown or data files, separate from the
design, so a redesign never touches the content.
- Fast: optimised and properly sized images, minimal JavaScript, and no
layout shift from web fonts (CLS under 0.1). It should score 90+ on mobile
Lighthouse for performance, accessibility and best practices on staging.
SEO gets checked on the live domain, since staging is noindex on purpose.
- Motion that fits the brief, and that respects reduced-motion settings.
- Fully responsive. Design the phone version on purpose, most visitors
will be on one.
- Accessible: real headings, alt text, keyboard navigation, readable
contrast.
- SEO basics: titles, descriptions, Open Graph images, sitemap, robots.txt,
schema.org structured data for my business.
Ship it:
- Build and check a local preview first. Then create a private GitHub repo
and push, using the GitHub browser sign-in if needed.
- Run type checks, tests, cf build and cf deploy --dry-run. Keep type
checks separate: cf can invoke the framework build directly.
- When those pass, use cf auth login if needed and tell me when to review
access. Use cf deploy for a separate staging Worker on workers.dev.
No custom domain, vault or CI token needed for this local deploy.
- Keep staging noindex. It is still public, so use no private customer data.
- Open the staging site yourself, check every page on desktop and phone
sizes, and fix anything that looks off before you show me.
- Leave automatic GitHub deployments for the optional tokens appendix.
Keep this new site on cf; do not add Wrangler as a second setup path.
Then send me the staging link, a short summary of the design direction, and
the list of TODOs you need from me.I designed this site in Claude [chat / Design]. The design is in
[FILE, FOLDER OR HANDOFF]. Keep its look and its content, and build it
as my real website following everything below.Path B: The site plus a CMS
Above is my brief. Build my website WITH a CMS, so [who: me / my staff] can
edit content without code.
Everything in the Path A approach still applies: you're the designer, take a
real swing, write DESIGN.md first, no generic AI layouts, real copy from my
material, TODOs instead of invented facts.
Compatibility first:
- Start from Payload's current official Cloudflare template. Check its
Next.js adapter and deployment support against our pinned cf version.
Prove a local build and a deployment dry run without credentials.
- If unsupported, stop before creating resources. Explain the precise
limitation and the framework-specific alternative, and wait for my
choice. Do not silently replace cf throughout my setup.
- Record the validated build, dry-run and deployment commands, tested
versions and configuration paths in this project's CLAUDE.md. If I
approved a framework deployment exception, carry that same route into
launch and CI. Do not migrate it later without a separate decision.
CMS setup, after that check passes or I approve the specific exception:
- Payload CMS (latest v3), with D1 for the database and R2 for media.
Use cf to create and manage the Cloudflare resources.
- Generate PAYLOAD_SECRET and save it to my vault. Set it as a Worker secret.
- Pages built from blocks. Design a block library for THIS site, not a
generic one. Think: hero, rich text, media with text, gallery, feature
grid, testimonials, FAQ, call to action, form, [plus site-specific ones:
menu section, price list, team, process steps, before/after...]. Every block
should look great with any reasonable content, handle missing images, and
have a preview image in the admin so editors can see what they're picking.
- Collections for what actually repeats on this site: [e.g. menu items,
services, products, projects, blog posts, testimonials, team members].
Plus Media, Forms, Form submissions, Redirects, Users.
- Globals for Header, Footer and Site settings (contact details, hours,
social links, analytics IDs).
- Drafts, and live preview on everything editable, with click-to-edit from
the preview to the right field.
- Publishing is instant: pages are cached for speed, and publishing clears
exactly the pages that changed.
- SEO fields (title, description, social image) on every page and post.
- Forms built in the CMS, protected with Turnstile, saved to the database
before any email is sent. Build and test the form now; connect domain
email in chapter 8, after the domain is ready.
- Keep the admin simple for a non-technical editor: hide fields they
shouldn't touch, use plain labels and help text, sensible defaults.
- Seed the CMS with all the real content, so the site is complete on day one.
Ship it:
- Build and check locally, then save to a private GitHub repo. Share a
workers.dev staging site with cf using the configuration validated above.
If I approved a framework exception, use only that documented command
for deployment. Keep staging noindex and use no private data.
- Apply only the new staging database's required migrations for this build.
Keep staging separate from any production data. Defer GitHub Actions to
the optional automatic-deploy appendix; no deployment token needed now.
- Set up automatic daily D1 backups.
- Create an admin login for [EMAIL], with a strong random password saved to
my vault as PAYLOAD_ADMIN_PASSWORD.
- Open the staging site and the admin yourself, check it all works,
including editing a page and publishing it.
Send me the staging link, the admin link, a two-minute "how to edit your
site" guide written for [who], and your TODO list.Path C: The site plus a store
Add a store to my site using Stripe. STRIPE_SECRET_KEY in my vault is a test
mode key. Do everything through the Stripe API.
What I sell: [products, prices, options like sizes or flavours].
How it gets to them: [shipping (where, how much) / local pickup (where, which
days, how much notice) / delivery radius / digital download].
Taxes: [e.g. "I'm in BC, charge GST and PST" / "set up Stripe Tax"].
Build:
- Product pages and a cart that match the site's design, not a bolted-on
template. [If there's a CMS: products are managed in the CMS and synced to
Stripe automatically when I publish.]
- Checkout with Stripe Checkout (hosted). Never handle card details on my
site.
- Create the products and prices in Stripe yourself.
- A webhook endpoint on my site for completed payments. Create it in Stripe
through the API, verify its signature, and save the signing secret to my
vault as STRIPE_WEBHOOK_SECRET and as a Worker secret. The webhook, not
the redirect back from checkout, is what marks an order as paid.
- Save every order to the database. Until my domain email is ready, test
notifications with a local test sink; do not block the store build on DNS.
- Customer emails: [Free Cloudflare plan: turn on Stripe's own email
receipts through the API / Paid plan: send the customer a branded
confirmation that sounds like my site with Cloudflare Email Service, and
leave Stripe's receipts off so they don't get two].
- [Pickup: let customers choose a pickup date, respecting my notice period and
closed days.]
- Success and cancelled pages that make sense.
Test it end to end on staging with Stripe test cards: a successful payment,
a declined card, and an abandoned checkout. Show me the order in the
database and any test emails. List domain email as a launch prerequisite
if it is not configured yet; do not claim email delivery was tested.
Finally, give me a launch checklist for switching to live mode.Path D: Events, bookings, and everything else
I want to add [the thing: RSVPs for my event / class bookings / a members
area / a waitlist / ...] to my site.
How it works for visitors:
[Step by step, in plain words. What they see, what they click, what they
get afterwards. Example: "They pick a class from the schedule, enter their
name and email, and get a confirmation. They can cancel from a link in that
email."]
How it works for me:
[What you need to see or do. Example: "I see a list of who's booked into
each class, I can cancel a class and everyone booked gets told, I get an
email when a class is full."]
Rules and limits:
[Numbers and edge cases. Example: "12 spots per class, a waitlist after
that, bookings close 2 hours before, no double-booking the same person."]
Payments: [none / Stripe, $X per ticket, refunds up to 48 hours before].
Use cf to work with what's already on my Cloudflare account (and Stripe, for payments)
unless there's a strong reason not to. Before you build anything, reply with:
1. A one-paragraph plan in plain language.
2. Which Cloudflare pieces you'll use and why, one line each.
3. What it costs on my plan, and whether anything needs the $5 Workers plan.
4. Anything that needs me (a Stripe account, a DNS change, a click).
5. The edge cases you thought of that I didn't.
I may not have a domain yet. Use test services for domain-dependent email
and list those connections for pre-launch. Do not require a domain to build.
Wait for my yes. Then build it on staging, design it to match the rest of
the site, and test it end to end as a visitor and as me, including the edge
cases. Show me the staging link and walk me through it.I want RSVPs for my sourdough workshop on my site.
For visitors: a workshop page with the date, time, what's included and how
many spots are left. They enter their name, email and any dietary needs and
pay $85 through Stripe. They get a confirmation email with the address and
an "add to calendar" link, and a reminder the day before.
For me: a private page that lists everyone who's paid, with their dietary
needs, and a button to email everyone at once. An email to me when it's
full.
Rules: 16 spots, then a waitlist. If someone cancels more than 48 hours
before, refund them and email the first person on the waitlist. No refunds
after that.
Use what's already on my Cloudflare account and Stripe. Plan first, wait for
my yes, then build on staging and test it, including two people buying the
last spot at the same time.Before launch: Buy your domain on Cloudflare
I want to transfer [DOMAIN] to Cloudflare Registrar from [REGISTRAR].
Don't start the transfer and don't pay for anything. First check and
tell me in plain words:
- Is the domain active on Cloudflare in my account?
- From the public RDAP or WHOIS record: when it was registered, when
it expires, the date of its last transfer if it shows one, its status
codes (is it locked?) and whether DNSSEC is on.
- Does Cloudflare Registrar support this ending?
- Anything that would block or delay the transfer, and what I need to
turn off at [REGISTRAR].
Then give me the steps for [REGISTRAR] and Cloudflare, and wait for me.My site is ready on staging. My launch domain is [DOMAIN], registered at
[Cloudflare / REGISTRAR]. Prepare it for launch, but do not publish the new
site or buy or transfer a domain for me.
Use cf with the browser login from my preview. Find the needed zone and
DNS commands with cf cli search and inspect their help/schema. If this
login lacks required access, explain the exact permission before asking
me to approve it. Never ask me to paste a token in chat.
Check whether the domain is active in my account. If DNS is elsewhere, add the zone and compare its records with
the current provider, including the old site's records, MX, SPF, DKIM,
DMARC and verification records. Preserve the existing website and email.
Tell me any DNSSEC steps needed before a nameserver change.
Give me the exact nameservers and registrar instructions if I need to
change them. Wait for me, then check that the zone is active and existing
services still work. Save the domain and zone ID in this project's
CLAUDE.md. List what remains for forms, email, analytics and launch.Forms and email: a contact form and free email at your domain
Add a contact form to my site, and set up email on my domain. Do all of it
through cf, using command search and schema/help to find the right API calls. My domain is [DOMAIN] and is active
on Cloudflare. Keep production unchanged until I approve launch.
Form:
- Fields: [name, email, phone, message, plus anything specific: event date,
budget, service type...]. Design it to match the site, including clear
error and success states.
- Protect it with Turnstile. Create the widget through the API, put the site
key in the site config and the secret in a Worker secret (if my vault is configured,
save a backup as TURNSTILE_SECRET_KEY). Add rate limiting as well.
- Save every submission to a D1 database first, THEN send the email. If the
email fails, the submission must still be saved. Apply the database
migrations against the staging database as part of this build. Keep
production data separate; review production migrations before launch.
My Cloudflare Workers plan is [Free / Paid]. On Free, only send to my own
verified address and skip the visitor confirmation. On Paid, do both.
Sending:
- Set up sending from my domain. Add every DNS record
it needs (SPF, DKIM, DMARC, anything else) and verify the domain. If SPF or
DMARC records already exist, merge into them. Never create a second one,
and never replace or remove MX records.
- Send each submission to [YOUR EMAIL], from a no-reply address on my
domain, with reply-to set to the person who filled in the form so I can
just hit reply.
- [Paid plan only] Send the visitor a short, friendly confirmation email that sounds like the
rest of the site. It must not repeat anything they typed (otherwise
spammers use your form to send their message to strangers), and rate
limit it per recipient address.
Receiving:
- Set up Email Routing so [hello@MYDOMAIN] forwards to [YOUR EMAIL]. Tell me
when to click the verification email Cloudflare sends me. If MX records or
a rule for this address already exist, leave them alone, even if an API
status check says routing isn't configured.
Then test it end to end on staging: submit the form in a visible browser
window (Turnstile won't pass a hidden, automated one, so use Turnstile's test
keys if you automate it), confirm the submission is in D1, and confirm the
email was sent. Tell me to check my inbox (and spam
folder).I'm moving email for [DOMAIN] to [Google Workspace / Zoho Mail]. I've
signed up and it's asking me to verify the domain. Do the DNS in
Cloudflare yourself and tell me only what I have to click there.
Before you change anything, list my current Email Routing rules so no
address gets lost, and tell me whether the contact form's notification
email will keep arriving after the switch. If it won't, give me the
options and what each costs, and wait.
Then add the verification record, switch the MX records from Email
Routing to the new provider with the shortest gap you can, and set up
SPF, DKIM and DMARC for it. Merge into my existing SPF and DMARC records,
never a second one. Finish with a test email in each direction.Analytics: GA4, Tag Manager and Search Console
Set up analytics and Search Console for [DOMAIN], doing everything you can
through gcloud and the Google APIs. Only stop for me where Google requires a
human, and when you do, give me the exact link, copy anything I need to paste
to my clipboard, and tell me precisely what to click.
1. Google Cloud: sign me in with gcloud (browser flow, my Google account
[EMAIL]). Create a project called "websites" (or reuse it if it exists).
Enable: Google Analytics Admin API, Google Analytics Data API, Tag Manager
API, Search Console API, Site Verification API.
2. Service account: create one called "claude-websites", create a JSON key,
save the whole JSON to my vault as GOOGLE_SERVICE_ACCOUNT_JSON, and delete
the key file from disk. Never print it.
3. Search Console (no clicks from me): as the service account, get a DNS
verification token from the Site Verification API for the domain, add the
TXT record through cf, verify, and add the domain property
to Search Console. Then add [EMAIL] as an owner, and tell me to add the
property once in my own Search Console (it auto-verifies because I'm
already an owner, but it won't show up in my list until I add it).
4. The two human steps. Walk me through them one at a time and wait for me:
a. GA4: send me to create a Google Analytics account for [BUSINESS NAME]
and accept the terms. The wizard insists on a property too: tell me to
name it after the site and click through the rest with any answers,
you'll fix the settings. Then have me add the service account email
(copy it to my clipboard) as an Administrator under Account access
management.
b. GTM: send me to create a Tag Manager account for [BUSINESS NAME] with a
Web container for [DOMAIN] and accept the terms. Then have me add the
service account email with BOTH: account Administrator, and Publish on
the container. (Account Administrator alone can't edit or publish the
container.)
5. GA4 via API: set the property's time zone to [TIME ZONE] and currency to
[CAD/USD], create a web data stream for https://[DOMAIN] with enhanced
measurement on, and add [EMAIL] as an Administrator.
6. GTM via API: in the container, create a Google tag with the GA4
measurement ID firing on all pages, and GA4 event tags for what matters on
this site: form submissions as generate_lead, [phone and email clicks,
booking link clicks, purchases...]. Fire the form event from a data layer
push in the site code, not a click trigger that breaks on the next
redesign. Publish the container with a clear version name.
7. Site: add GTM to the site properly for its framework, on the live domain only
(not staging). Set up cookie consent region-aware, with Google Consent
Mode v2:
- Inline consent defaults before GTM loads: granted by default, denied in
the EU/EEA, UK, Switzerland and Quebec (Consent Mode's region list),
with wait_for_update.
- The Worker sets a small first-party cookie with the visitor's country
and region from Cloudflare, so the site knows who needs a banner.
- Only visitors in those strict regions see a banner (accept, reject,
manage). Everyone else gets no banner and a "Cookie settings" link in
the footer that opens the same preferences (necessary, analytics,
marketing).
- Honour Global Privacy Control: ads storage off when the browser sends it.
- A stored choice always wins, is versioned, and expires after 6 months.
- A ?consent-region=FR style override so you can test any region.
- Make every non-Google tag in GTM require ad_storage, since Consent Mode
only governs Google's own tags.
- Load GTM through a Google tag gateway on my domain (/metrics proxied to
the container's fps.goog host) so ad blockers don't wipe out the data.
- A short privacy page with a cookies section explaining all of the
above, linked from the footer and the consent UI.
Style it all to match the site.
8. Mark generate_lead (and purchase, if the site sells) as key events.
9. Prepare sitemap.xml and robots.txt for the final domain. Keep staging
noindex. Do not submit a staging sitemap to Search Console.
10. Deploy to staging and check the consent UI without sending staging
visits to production analytics. Leave the live-domain tracking check
and sitemap submission for the launch prompt. Do not launch production
from this prompt.
Report: GA4 measurement ID, GTM container ID and published version, events
tracked, Search Console status, and the key's name in my vault.Going live on your domain
Launch this site on [DOMAIN] using the deployment route already validated
on staging and recorded in this project's CLAUDE.md.
For the default cf route, use the pinned cf version and reviewed
cloudflare.config.ts. If I approved a framework deployment exception in
Path B, keep its recorded build, dry-run and deployment commands and
configuration. Do not run cf init, cf dev, cf build or cf deploy against
that unmigrated project, or migrate it without separate approval.
Keep cf for account tasks, inspecting command help/schema rather than
guessing API fields. Keep the workers.dev address working as a separate
staging Worker.
1. Attach [DOMAIN] and www.[DOMAIN] to the production Worker as custom domains.
Pick one as the main address ([DOMAIN] without www, unless I say otherwise)
and redirect the other to it.
2. Make sure HTTPS is forced everywhere.
3. Then run a full launch check on the live domain and fix anything that fails:
- Every page loads, no broken links, no 404s from the navigation or footer
- Every page has a unique title and meta description, one H1, and a
proper Open Graph image for link previews
- sitemap.xml and robots.txt are correct for the live domain, and staging is
set to noindex so Google doesn't index it twice
- Favicon and app icons exist
- Images are properly sized and lazy loaded
- Mobile layout works at 375px wide, no horizontal scrolling
- Keyboard navigation and colour contrast pass basic accessibility checks
- Lighthouse scores for performance, accessibility, best practices and SEO,
on mobile. Fix anything under 90.
- Contact form sends, email arrives, spam protection works
- Analytics fires on the live domain: test consent acceptance, rejection,
footer opt-out and GPC, trigger the form event, and verify receipt
in GA4. Staging must still send no production analytics
- Structured data (schema.org LocalBusiness or Organization) with my real
business name, address, phone and hours: [DETAILS]
4. If Search Console is set up, submit the live sitemap.
Report what you fixed and the final Lighthouse scores.Before launching, this domain currently hosts my old site. Crawl it (and its
sitemap if it has one), list every URL, and set up 301 redirects from each old
URL to the closest matching page on the new site. Nothing that used to exist
should 404.How do I change my site after it's live?
Update the opening hours on the contact page and in the footer to:
Tue to Sat 8am to 4pm, closed Sun and Mon. Update the structured data too.
Deploy to staging, send me the link, and deploy to production after I say yes.Add a new menu item: "Lemon Pistachio Loaf", $14, photo is in
~/Downloads/loaf.jpg. Match the style of the existing items.I want to add a catering section: a landing page, three package tiers, and an
enquiry form that asks for date, guest count and dietary needs. It should feel
like the rest of the site, not bolted on. Look at how the menu page is
designed and push it a bit further. Staging first.[Describe what's wrong, where, and what you expected.]
Figure out why before you change anything, fix the cause not the symptom, and
tell me what it was in one sentence.Appendix A: The key vault, when you need it
security add-generic-password -a "$USER" -s bitwarden-secrets-token -wSet up Bitwarden Secrets Manager for the extra services on my site. My
project is "websites". Its machine account has read/write access, and the
access token is in my system keychain as "bitwarden-secrets-token"
(macOS generic password or Windows Credential Manager generic credential).
Install the bws CLI. Make a helper called withkeys that loads only the
needed secrets into a child command with bws run. Never print values or
put them in chat, shell history, project files or commits. Also provide a
safe way to save newly created secrets without printing them.
Verify vault access without revealing values. Add the vault location,
helper usage and secret-handling rules to my Claude instructions, preserving
existing instructions. Keep Cloudflare's local browser login separate;
do not create a Cloudflare API token just to populate this vault.Appendix B: Tokens and automatic deployments
My site already deploys from this computer. Add automatic staging deploys
from GitHub Actions using the deployment route validated on staging and
recorded in this project's CLAUDE.md.
- Default cf route: keep the pinned cf version and reviewed
cloudflare.config.ts. Do not let CI invent configuration on its first run.
- Approved framework deployment exception from Path B: keep its recorded
build, dry-run and deployment commands, versions and configuration.
Do not run cf init, cf dev, cf build or cf deploy against that unmigrated
project, or migrate it without separate approval.
Keep cf for account tasks; it does not replace the approved exception's
build or deployment command.
The dedicated token is in my vault as CLOUDFLARE_DEPLOY_TOKEN. Read it only
in the command that sets GitHub Actions secrets. Set that repository secret
and CLOUDFLARE_ACCOUNT_ID, then map CLOUDFLARE_DEPLOY_TOKEN to the
CLOUDFLARE_API_TOKEN environment variable only in the deploy job. Do not
copy my browser-login credentials into GitHub.
Run lint, type checks, tests and the production build on pull requests
without deploy credentials. Keep type checks separate from the framework
build. For the default cf route, include cf deploy --dry-run; a push to main
may deploy the tested staging build with cf deploy --prebuilt, using the
same mode as the build. For the approved framework deployment exception,
use its recorded validation and staging deployment commands instead.
Staging stays noindex. Production is a separate, approved action.
Check for pending database migrations and report them before making data
changes. Never point a preview workflow at production by accident.
Verify a staging run and its public URL. Report the token's scope and
expiry without its value, and document how I renew it. If a permission is
missing, identify that permission; do not request blanket account access.On a phone, swipe left and right to turn pages.