Contents Lesson 20 of 21

10 min read · foundations

Deploy something tiny, and what Build Your First Tool expects

By the end of this lesson you will have a one-page site with your name and today's date, in its own repository on GitHub, live at a public address you have opened on your phone.

Build Your First Tool defines success as "deployed at a URL you own". Here you do it once, on something trivial, so the word means something before it matters.

What deploying is

Your code runs on your machine because your machine is on. Deploying puts it on a machine that is always on, at an address anyone can open.

That is the whole idea. The rest is a hosting provider's setup, and modern ones do it from a git repository in a few clicks.

Do it with one page

Not an application. One page that says your name and today's date.

  • Put it in a git repository and push it to GitHub.
  • Connect that repository to a host with a free tier.
  • Open the URL it gives you, on your phone.

GitHub is the first outside service in this course, so here are the steps in order. You do them yourself; the agent does not touch accounts.

  1. Make a GitHub account at github.com (free) if you do not have one. Use a username you would not mind in a public address.
  2. Create an empty repository. On GitHub choose New repository, name it my-first-page, set it to Public (the free host needs that), and leave "Add a README", .gitignore and licence all unticked. A repository that already holds a README makes your first push fail, because your history and GitHub's start differently.
  3. Commit locally. git status should list only index.html (and nothing starting with .env); then git add -A and git commit -m "One page with my name and today's date, the first thing I deploy". Then send it to GitHub with three commands: git branch -m main, git remote add origin <the address GitHub shows you>, git push -u origin main.
  4. Sign in when asked. The first git push opens a browser window (or a sign-in box) asking you to authorise git with your GitHub account. Approve it; later pushes will not ask again. If the terminal asks for a password instead, GitHub no longer accepts your account password there: use the browser sign-in, or create a personal access token under Settings, Developer settings.
  5. Turn on the host. In the repository on GitHub: Settings, Pages, "Deploy from a branch", branch main, folder / (root), Save. Wait a minute and reload the Pages screen; it shows the address.
  6. Open that address on your phone.

Seeing something you wrote answer at a public address is the moment the abstraction becomes concrete, and it is worth having before you have anything to lose.

Two things you have now proved

Your git works end to end — local commits reaching a remote. Build Your First Tool assumes this from lesson 1.

You know what "public" means, having just made something public. That connects directly to unit 3: everything the browser receives, the visitor can read. You have now been on both sides of that sentence.

What Build Your First Tool assumes you have

A checklist, so nothing there is a surprise:

  • Editor, Node, git installed and checked.
  • Comfortable with pwd, ls, cd, and reading an error.
  • git init/add/commit/log/diff, and a repository pushed to GitHub.
  • You can read a function, an object, an array, an if and a loop — and say what one does.
  • You have made a real API request, checked a status code, and parsed JSON.
  • You know the difference between client and server, and why a key in client code is public.
  • You can narrow a failure to the smallest case that still breaks, rather than changing things until it works.
  • You can make a branch, merge it, and undo a committed change with git revert.
  • Claude Code or Codex CLI (or an editor's agent mode) installed, starting in its learning mode — Manual or Read Only — with a rule keeping it out of .env files, and one change accepted after reading its diff.
  • Something of yours deployed at a URL.

If any line is not true, that lesson is worth another twenty minutes now rather than in the middle of Build Your First Tool.

What comes next

Build Your First Tool builds a real watchlist: your instruments, your notes, live prices, deployed. It moves faster than this course because the assistant does the typing — and you will be reading everything it writes.

Try it now

Deploy the page, then open it on a device that is not your computer. Then go through the checklist honestly and fix anything that is not true. Starting Build Your First Tool with all ten lines solid is the difference between a course that teaches you and one that fights you.

The prompt

Make a new, empty folder for the page — not your course folder, whose notes and fake key have no business in a public repository. Start your agent there — claude or codex — press Shift+Tab until plan mode shows under the prompt, and paste, with your name in place of the brackets:

Plan first and change nothing yet. I want one file, index.html: a page
that says my name, [your name], and today's date, written by a few
lines of JavaScript when the page loads. No framework, no build step,
no dependencies, and no network request of any kind. Tell me the file
you will create and the commands you will run.

When I approve: create the file and run git init. Do not commit, do
not push, and do not create any account. I do those myself.

A good answer is one file of about fifteen lines and a plan that stops before the commit. The page calls no API, so there is no cost to state.

Check it yourself

  1. Opened straight from the folder in your browser, index.html shows your name and today's date.
  2. After your commit, git log --oneline shows one line and git status reports nothing to commit.
  3. On GitHub, the new repository holds index.html and nothing else.
  4. The public address opens on your phone, on mobile data rather than your wifi.
  5. View the page's source. All of it is public now, and none of it is anything you would mind a stranger reading.

Compare with ours

Our page, and how we put it online
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Your Name</title>
<h1>Your Name</h1>
<p>Today is <span id="today"></span>.</p>
<script>
  document.getElementById("today").textContent = new Date().toDateString();
</script>
</html>

We pushed it to a new public repository and used GitHub Pages as the free host:

git branch -m main
git remote add origin https://github.com/YOUR-NAME/my-first-page.git
git push -u origin main

Then, on GitHub: Settings, Pages, deploy from a branch, branch main, folder root. A minute later the page answers at https://YOUR-NAME.github.io/my-first-page/. The git branch line matters only if your git named its first branch master; if you did it in lesson 4, it changes nothing.

Your agent's page will not match ours line for line: a <p> instead of a <span>, another way of writing the date. What has to match is your name, today's date, and no request to any server.

Checkpoint

Nothing more to commit: step 3 made the commit and pushed it. Check the state from the page's folder:

git status           # nothing to commit, and up to date with 'origin/main'
git log --oneline    # one line, your message

If git status says your branch is ahead of origin/main, the push did not happen: run git push -u origin main again. Then answer this lesson's questions.