AI websites

Step-by-step tutorial

How to Update an AI-Generated Website After Publishing

Update a live AI-built site with GitHub and Cloudflare Pages: preview one small change, publish approved files, verify the version, and understand rollback.

Product links on this page are ordinary official links. No affiliate commission is currently attached. Read our disclosure.

A Beginner’s Guide to GitHub + Cloudflare Pages

Your website is live. You want to fix a sentence or add an article without accidentally replacing the site with unfinished work.

The repeatable process is find the right source → make a small change → preview and build → approve the exact changes → send them to GitHub → verify Cloudflare’s deployment → check the real page.

This guide is for a static website, which serves finished page files, with an existing GitHub repository and an already configured Cloudflare Pages Git integration. You need access to the source project, repository and Pages project, plus your public website address. A repository is the project folder and its version history stored in GitHub.

If you edit inside a builder with built-in hosting, upload finished files through Direct Upload, or run an app with a database, your update process may differ. Do not apply these instructions blindly. For initial setup, use How to Publish an AI-Generated Website. If you are deciding which hosting route fits, use Best Ways to Host an AI-Generated Website.

Official documentation checked October 6, 2026. The example below uses our recorded article releases; branch previews and rollback are documented options, not procedures we have rehearsed on this site.

1. Why editing your files does not immediately update the live site

There are four different places to keep straight:

Place What it contains
Local project The editable files on your computer or in your coding workspace. Saving here changes that copy.
GitHub repository The versions you have sent to GitHub. Unsaved or unsent local work is not automatically included.
Cloudflare deployment A version Cloudflare has built and put onto its hosting service. A build turns source files into finished website files.
Production website The public version visitors see at your official address. It may still be an older successful deployment.

With Pages Git integration, pushing a change to a connected branch can trigger a deployment. Which branch becomes production depends on your project’s settings.

Saving a file, recording a version in Git and sending it to GitHub are separate steps. None of them alone proves that your visitors can see the update.

2. Find the project that controls your live website

Before asking AI to edit anything, make a short project record:

  • Source folder: the original editable project, not just an exported or generated output folder.
  • GitHub repository: the exact owner and repository name connected to Pages.
  • Production branch: the named line of versions used for the live site. Do not assume it is called main.
  • Deployment behavior: whether automatic production deployments are enabled.
  • Public address: your official domain and the exact page you intend to change.

In Cloudflare, open the existing Pages project under Workers & Pages. Read its repository connection and branch/build settings; do not create another project. Cloudflare documents the production branch and automatic-build controls in its branch deployment guide. Interface labels can vary, so identify the settings rather than relying on a button’s position.

Compare those settings with the project open in your coding tool. Ask it to show the connected GitHub repository, current branch and existing uncommitted changes. Uncommitted changes are edits not yet saved into a Git version. Keep them intact, including work unrelated to this update.

For our site, the recorded production branch was main; Astro generated the site using npm run build, with finished files in dist. Those values describe this project, not every AI-generated website. Editing only our dist output would leave the source used for the next build unchanged.

If your folder contains only downloaded pages and you cannot identify the source repository, stop here. Find the original project or ask its creator which files control the deployed site.

3. Make one small, specific change

Choose something you can recognize immediately on the finished page. For example:

On the About page, replace “We cover every AI tool” with “We publish practical guides for everyday AI tasks.” Keep the layout, links and all other wording unchanged. Show me the changed file before publishing.

That is an illustrative request, not a change made to this website for this guide.

For a real example, our first article was released in commit 0170014. When we later published the hosting guide in f8db15c, we also added one relevant link in the first article’s Next step section. The history shows the specific edit, and the saved release checks confirm that the link appeared online.

Keep the first update similarly narrow. Do not let the assistant redesign the layout, upgrade the project’s software packages, rename page addresses or regenerate the entire site as part of a text edit.

If you add an article, follow the project’s existing content format. In this site, draft: true keeps an article out of production; that is our project’s behavior, not a universal Cloudflare feature. Leave other drafts alone.

4. Preview and check the change

Ask your coding tool to start the project’s existing local preview and give you the address. A local preview, often using localhost or 127.0.0.1, shows work in your development environment. It does not mean the public website has changed.

Check four things before approving publication:

  1. Content: is the exact replacement visible on the intended page? Did anything else change?
  2. Links: open any added link and the navigation leading to the changed page. Check that each destination is the intended one.
  3. Build: run the project’s existing production build and relevant checks. Ask for the result and any errors, not just “the preview works.” Check that unapproved drafts remain excluded.
  4. Mobile layout: use a narrow browser preview or a phone that can access the preview. Look for clipped text, unreadable tables, overflowing code and hard-to-tap links.

Ask the assistant for a diff: a before-and-after view of changed lines. Compare the file list with the scope you requested. A successful local build checks the local files; files accidentally left out of the later commit will not reach Cloudflare.

What about an online preview?

Cloudflare can make a preview deployment from a non-production branch when preview builds are enabled. This gives a hosted address to review without replacing production. It still requires sending code to GitHub and creating a deployment; it is not the same as a local preview.

Preview URLs are public by default, so do not treat them as private storage. A branch alias can follow newer work, while a particular deployment’s hash-based address can continue showing an older version. Copy the address from the deployment you actually intend to review.

If your team already uses this route, follow its approval process. This tutorial does not require you to introduce a new branch workflow or change preview settings for a small update.

5. Publish only the approved changes

Git records file versions. A commit records the changes you selected and gives that version an identifier, often shown as a short string such as f8db15c. A push sends local commits to GitHub.

Before either step, tell your assistant exactly which changes are approved. Review the selected files and lines. Do not use a blanket command such as git add . to include unrelated drafts, credentials or other unfinished work. If an approved file also contains unrelated edits, separate those changes before committing.

If you use GitHub Desktop, GitHub’s graphical app, its official review-and-commit guide documents file selection in Changes, partial commits, a Summary message and Commit to BRANCH. Select only the approved changes. This is a documented alternative to assisted Git commands; we did not use Desktop for our recorded releases.

Next, review every local commit that would be pushed, not only the latest one. A push can carry earlier unsent commits too. Confirm the target repository and branch, then authorize the push. In Desktop, Push origin sends those commits. If the remote branch has newer work or a conflict appears, stop and reconcile it with help; do not force-push over it.

Pushing to an automatically deployed production branch is a release action. For a protected branch, follow the repository’s existing review process; a pull request is a request to review and merge changes into another branch. Do not bypass that process.

Open GitHub afterward and confirm the intended branch contains the expected commit and changed file. Save the commit identifier for the next check.

6. Confirm Cloudflare deployed the intended version

Open the existing Pages project’s Deployments and find the deployment associated with your update. Compare:

  • The production environment and configured production branch.
  • The commit identifier against the version now on that branch in GitHub.
  • The deployment’s completion status, not merely that a build started.

If an approved branch was merged through a pull request, use the resulting production-branch commit for this comparison; its identifier may differ from the earlier preview commit.

For errors, Cloudflare documents Deployments → View details → Build log in its debugging guide. The log is the record of what the build did. Give your assistant the relevant error text with secrets removed, and ask for a targeted fix.

Cloudflare also reports build checks in GitHub. A successful GitHub push is not itself a successful Cloudflare build. Even a successful build is not proof that the intended content was included.

7. Check the real website

Open the official domain from your project record, then the exact changed page. Do not use a bookmarked old deployment address as the final check.

For a text edit, locate the new sentence and confirm the old one is gone. For an article, open its direct address and follow the intended link from the category or another page. Then check the homepage and a few important existing pages.

Use this acceptance list:

  • The intended new content is visible at the correct address.
  • Changed links open the correct destinations.
  • Images, navigation and mobile layout still work.
  • Important existing pages still load and show their expected content.
  • No unrelated draft or private test content has appeared.

HTTP 200 means the request succeeded; it does not prove the content is current. Our hosting-guide release record checked the article title, the new link from the first article and sitemap inclusion alongside response status. That is stronger evidence than a green status alone.

For a newly published page, also check its canonical, the preferred page address, and its sitemap, the site’s list of public pages. If it should be searchable, confirm it is not marked noindex, an instruction to stay out of search results. Search engines discovering an update is separate from the website serving it.

8. Common problems

I edited the page, but nothing changed online

Trace the path in order. Does the source folder match the connected repository? Is the replacement visible in the committed file on GitHub? Is that commit on the production branch? Has Cloudflare successfully deployed that version? This separates editing the wrong project from forgetting to commit or push.

GitHub has the change, but production still shows the old version

Check whether the push went to another branch or created only a preview. Confirm automatic production builds are enabled. If no build was created, check branch controls and any deliberate build-skipping rules; Cloudflare’s GitHub integration documentation describes skipped builds. Do not change settings at random or create another Pages project.

Cloudflare’s build failed

Read the error in the build log. Compare the committed files with the locally tested changes; a missing file or an unexpected package change deserves investigation. Ask for the smallest evidence-based repair, run the checks again and review the new diff before another release. Do not repeatedly publish the same broken update without understanding the error.

The deployment succeeded, but I still see old content

First match the commit and page address. Check that the new content is actually in that version and that you have not opened an old preview. Only then try a fresh browser session or reload to investigate caching, which is reuse of a previously saved response. Record which address and browser show the difference before asking for further help.

A normal content update on the same Pages project does not call for changing DNS, the address-book settings connecting your domain to the host. Do not start troubleshooting by changing DNS or clearing the entire site’s cache.

9. What to do if an update breaks the site

Stop making additional releases while you identify the faulty change. Record the affected address, symptom and deployment identifier, and locate a previously working production version.

Cloudflare’s rollback documentation says a successfully built production deployment can be a rollback target; preview deployments cannot. The documented control is Rollback to this deployment in the target deployment’s actions menu. Confirming it changes production, so first verify the target and obtain the site owner’s approval. We have not performed a rollback drill on Just Make AI Work.

A deployment rollback changes which hosted version visitors see. Treat source repair as a separate job: fix the faulty files or revert the relevant commit, test the repair and publish it through the normal process. GitHub documents that reverting a commit creates another commit and preserves the original history.

Do not assume rolling back the hosted version repairs the source that a future automatic build will use. Also do not treat a static-site rollback as a backup of databases or outside services. After any authorized rollback, check the real website again.

10. A reusable prompt for your AI coding assistant

Replace the bracketed values before using this:

Help me update my existing static website safely.

Official site: [URL]
Requested change: [exact page, old content and new content]

First identify the original source project, connected GitHub
repository, current branch, production branch and deployment setup.
Show the current Git status and preserve all existing files and
uncommitted work. If any of these facts is unknown, ask me.

Change only what is necessary for this request. Do not redesign,
upgrade dependencies, rename routes, or modify unrelated drafts.
Do not recreate the project from scratch or regenerate unrelated
source files. Running the existing build command for validation
is allowed. Do not change DNS, domains or hosting settings.
Do not delete or discard existing work.

Show the exact file diff. Run the existing build and relevant checks,
check links and mobile layout, and give me a local preview.
Confirm that unapproved drafts stay out of the production build,
public navigation and sitemap.

Stop for my review. Do not commit, push, create an online deployment
or execute a production rollback unless I explicitly approve it.

If I later approve release, select only the approved files or lines.
Review all commits that would be pushed and confirm the destination
branch. Never use git add . blindly, force-push, reset --hard or
git clean to solve an unrelated problem.

After an approved release, match Cloudflare's production commit and
deployment status with GitHub. Check the official domain, the actual
changed content, relevant links and important existing pages.
HTTP 200 alone is not proof that the update is correct.
Report any failed or unverified check instead of claiming success.

Keep a short release note with the change, commit identifier, deployment and checked page addresses. It gives you a starting point for the next update and a useful record if something goes wrong.