Blog

Publish a static site on Cloudflare Pages: direct upload, then from Git

Create a Cloudflare Pages project with direct upload and check its live address. Then connect a GitHub repository, including the step where GitHub asks the owner for a confirmation.

Publish a static site on Cloudflare Pages: direct upload, then from Git

2026-11-29

Direct upload

  1. In Cloudflare, open Workers and Pages, press Create, then Pages, then Drag and drop your files, then Get started.
  2. Type a project name. Cloudflare shows the address it will use: name.pages.dev. Press Create project.
  3. Drop index.html into Upload your project assets, or choose the file. Press Deploy site.
  4. Check the address: curl -sS -D - -o NUL https://name.pages.dev/ shows 200 and server: cloudflare.

From Git

  1. Create a private repository on GitHub or a private project on GitLab. Upload index.html with the web interface: Add file, Upload files, Commit changes.
  2. In Cloudflare Pages, choose Import an existing Git repository, then GitHub, then Connect GitHub. Authorize the Cloudflare Workers and Pages app.
  3. On the GitHub app settings, choose Only select repositories and pick the test repository. GitHub asks for a sudo confirmation (a password or an emailed code) before it changes repository access. The owner enters that code at this step.
  4. After the repository appears in the list, press Begin setup, keep the default settings for a plain HTML file, and deploy.

Notes

Direct upload needs no Git account and no token. The Git link needs the owner to approve the repository access on GitHub once. After that, each commit to the connected branch deploys again.

All posts