TRAVEL TEFUDA
免费公网部署 Free public launch

Codex
自动部署
公网网站。

Codex
Automates
Public Deploy.

核心不是手动点完每个后台,而是把目标交给 Codex:它读取本地项目,调用 GitHub 推送代码,再通过 Cloudflare 插件创建 Pages、检查部署、配置域名。

The point is not clicking every dashboard manually. Give Codex the goal: it reads the local project, pushes to GitHub, then uses the Cloudflare plugin to create Pages, verify deployment, and prepare the custom domain.

自动化中枢 Codex Agent
发布平台 Cloudflare Pages
版本同步 GitHub Push
Automation hub Codex Agent
Hosting layer Cloudflare Pages
Version sync GitHub Push

操作路径

Launch Path

  1. 01.给 Codex 明确目标Give Codex the goal
  2. 02.GitHub 保存与同步Sync through GitHub
  3. 03.Cloudflare 自动发布Deploy with Cloudflare
  4. 04.域名与 HTTPS 验收Verify domain and HTTPS

STEP BY STEP

STEP BY STEP

这四步展示的是 Codex + GitHub + Cloudflare 插件的自动化链路。示意图里的账号、域名和项目名均为 mock 数据。

These four steps describe the Codex + GitHub + Cloudflare plugin automation path. All account names, domains, and project names are mock data.

01

让 Codex 读取本地项目

Let Codex read the project

把站点目录、发布目录、仓库名、是否需要自定义域名说清楚。Codex 会检查文件结构和 Git 状态,再决定部署方式。

Tell Codex the site folder, publish directory, repo name, and whether a custom domain is needed. Codex inspects the file tree and Git state before deploying.

github.com/your-name/your-site
Local Site Folder
path/to/html-guide
Repo Name
your-site
Target
Public Website
02

Codex 推送 GitHub 并触发同步

Codex pushes and syncs

Codex 会提交网页文件、推送到主分支,并确保后续每次更新都能通过 GitHub 触发 Cloudflare Pages 自动构建。

Codex commits the site, pushes to the main branch, and keeps future updates tied to Cloudflare Pages automatic builds.

dash.cloudflare.com/pages/new
GitHub Action
commit + push
Production Branch
main
Publish Directory
path/to/html-guide
Trigger
Cloudflare Pages
Push to Deploy
03

Cloudflare 插件创建 Pages

Cloudflare plugin creates Pages

Codex 通过 Cloudflare 插件创建 Pages 项目,设置发布目录,等待部署完成并检查公网 URL。无需你反复在控制台里找入口。

Codex uses the Cloudflare plugin to create the Pages project, set the publish directory, wait for deployment, and verify the public URL.

registrar.example / nameservers
Cloudflare Plugin
pages.create
Project: your-project
Output: path/to/html-guide
Verify Deployment
04

域名与 HTTPS 留给最终验收

Verify domain and HTTPS

如果使用个人域名,域名必须先注册。Codex 可通过 Cloudflare 插件检查 Zone、创建 DNS 记录和 Pages 自定义域名;nameserver 修改仍需在注册商完成。

A custom domain must be registered first. Codex can check the zone, create DNS records, and attach the Pages domain through the Cloudflare plugin; nameserver changes still happen at the registrar.

dash.cloudflare.com/dns/example.com
TypeNameTarget
CNAME@your-project.pages.dev
CNAMEwwwyour-project.pages.dev
Pages Custom Domain
example.com
HTTPS Active

验收清单

CHECKLIST

真正上线前只看这四个结果:仓库可更新、Pages 可访问、域名已注册并切到 Cloudflare、HTTPS 正常。

Before calling it live, check four outcomes: repo updates work, Pages loads, the domain is registered and delegated, and HTTPS is active.

01 / Repo

推送到 main 后会触发 Cloudflare Pages 重新部署。

Pushing to main triggers a new Cloudflare Pages deployment.

02 / Pages

先用 Pages 免费二级域名确认公网能打开。

Use the Pages subdomain first to confirm public access.

03 / DNS

如果域名未注册,DNS 记录不会真正生效。

If the domain is not registered, DNS records cannot go live.

04 / HTTPS

nameserver 生效后再开启并检查 HTTPS。

Enable and verify HTTPS after nameservers propagate.

提示词模板

PROMPT TEMPLATE

把下面这段给 Codex,并确保 GitHub 与 Cloudflare 插件已经授权。Codex 就能按目标执行、遇到需要外部确认时再停下来问你。

Give Codex this prompt after GitHub and Cloudflare plugins are authorized. Codex can execute the deployment and pause only when external confirmation is required.

可复制给 Codex Copy to Codex

一句话
启动部署代理。

One prompt
starts the agent.

这段提示词强调“自动化执行”,不是让你手动照着教程点。Codex 会自己检查仓库、提交推送、调用 Cloudflare Pages、验证公网访问。

This prompt asks Codex to execute the workflow, not merely explain it. Codex checks the repo, commits, pushes, calls Cloudflare Pages, and verifies public access.

codex prompt / deploy.md
请作为部署代理执行:
把当前本地静态网站部署成公网可访问网站。

项目要求:
1. 检查本地站点目录:<发布目录>
2. 创建或更新 GitHub 仓库:<GitHub仓库名>
3. 提交并推送到 main,后续更新支持 git push 自动同步
4. 使用 Cloudflare 插件 创建 Pages 项目
5. 设置构建配置:无构建命令,输出目录为 <发布目录>
6. 部署后检查公网 URL 是否 200,资源和页面导航是否正常
7. 如需自定义域名 <自定义域名>:
   - 先确认域名是否已注册
   - 检查或创建 Cloudflare Zone
   - 添加 Pages Custom Domain 和 DNS 记录
   - nameserver 需要我去注册商后台改时,请明确告诉我

请直接执行;只有授权、购买域名、修改注册商 nameserver
这类必须我确认的步骤再暂停询问。
Act as my deployment agent:
Deploy the current local static site as a public website.

Requirements:
1. Inspect the local site folder: <publish-directory>
2. Create or update the GitHub repository: <github-repo-name>
3. Commit and push to main; future updates should sync via git push
4. Use the Cloudflare plugin to create a Pages project
5. Configure build settings: no build command, output directory is <publish-directory>
6. After deployment, verify the public URL returns 200 and assets/navigation work
7. If using custom domain <custom-domain>:
   - Confirm the domain is registered
   - Check or create the Cloudflare Zone
   - Add Pages Custom Domain and DNS records
   - Tell me clearly if I must update registrar nameservers

Execute directly. Pause only for authorization, domain purchase,
or registrar nameserver changes that require my confirmation.