Skip to content

4. Put the code on GitHub

Cloudflare Pages deploys by watching a GitHub repository ("repo"). When you push new code to GitHub, Cloudflare automatically rebuilds and publishes the app. So first the code needs to live on GitHub.

Already on GitHub?

If the oncall-scheduler code is already in a GitHub repo your account can see, skip to Create the Pages project. This page is for first-time setup.

Create an empty repository on GitHub

  1. Sign in at https://github.com.
  2. Click the + in the top-right → New repository.
  3. Repository name: oncall-scheduler (anything is fine).
  4. Choose Private (recommended — this is internal code).
  5. Do not tick "Add a README" or any other initializer — you want it empty.
  6. Click Create repository.
  7. On the next page, copy the repo's URL. It looks like https://github.com/your-org/oncall-scheduler.git.

Push the code

In a terminal, in the oncall-scheduler folder:

# Only if this folder isn't a git repo yet:
git init
git branch -M main

# Connect it to the GitHub repo you just made (use YOUR url):
git remote add origin https://github.com/your-org/oncall-scheduler.git

# Stage and save everything, then upload:
git add .
git commit -m "Initial commit"
git push -u origin main

GitHub may ask you to sign in the first time (a browser window or a token). Follow the prompts.

If git remote add origin says it already exists

The folder is already connected to a repo. Check where with git remote -v. If it points at the right place, just run git push. To repoint it: git remote set-url origin https://github.com/your-org/oncall-scheduler.git.

What gets uploaded (and what doesn't)

A file named .gitignore keeps secrets and junk out of GitHub — things like .env, .dev.vars, and the node_modules folder are never uploaded. That's intentional and correct.

Never commit secrets

Don't force-add .env, .dev.vars, or anything with passwords/keys. Production settings go in the Cloudflare dashboard (Environment variables), not in the repo.

Confirm

Refresh your GitHub repo page in the browser — you should see the project's files (client/, functions/, shared/, migrations/, etc.).

Create the Pages project