Skip to content

Start building your next app or website — with AI, right in your browser.

Visit devdojo.com
Docs
GitHub

Sites 07 / 17

GitHub

Keep your site in a repository you own. Every change lands as a commit, and connecting GitHub makes your first site build free.

Your site is real source — Blade pages, components, a stylesheet, your images. Connect it to GitHub and it stays in a repository you own: every change you or the AI make becomes a commit on your branch, git log tells the story, and nothing is locked inside DevDojo.

Connect

Open your site's settings (/sites/{slug}) and find the GitHub card.

  1. Connect GitHub. You'll authorize the DevDojo GitHub App: pick the account (or organization), choose which repositories it may reach, and click Install. DevDojo only ever writes to repositories you link to a site. You only do this once. If the App is already installed on your account, GitHub asks you to sign in instead, and you're connected.
  2. Link a repository. Either create a new private repository (named after your site, under any account the App is installed on) or pick one you already have.
  3. Pick a branch. main by default. Prefer to review changes before they reach main? Use a branch such as devdojo and open pull requests from it on GitHub.

The first sync pushes every file of the site. From then on the card shows the repository, the branch, whether the last sync landed, and the latest commit.

What becomes a commit

Every burst of changes becomes one commit about twenty seconds after the last save:

  • An AI edit in the builder — the commit's first line is your prompt (AI: make the hero darker and add a testimonials row).
  • A save in the code editor — Update resources/views/pages/index.blade.php, or Update 4 files with the paths listed in the body.
  • A push from the CLI or a source import.

Only the files that changed are uploaded, so a one-line edit is a one-blob commit. Files you add on GitHub that the site doesn't manage (a README, a workflow) are left alone.

What the repository looks like

The first commit lays out the repository like a project you'd start by hand:

  • README.md — what the site is, its pages and their URLs, how to pull and push it with the CLI, how to deploy it. Yours to edit from then on.
  • netlify.toml and vercel.json — a static deploy of dist/ with no build step. Point Netlify or Vercel at the repository and it's live.
  • .github/workflows/pages.yml — publishes dist/ to GitHub Pages on every push (turn Pages on once: Settings → Pages → Source: GitHub Actions).
  • .gitignore — editor droppings.

dist/ is the published site as static HTML — the same export the ZIP download is made of — refreshed on every sync while the site is published. So the repository is not only your source: it is a deployable copy of the live site, anywhere that serves a folder. Unpublish and dist/ is removed on the next sync; the source stays.

Commits are authored as you — your GitHub name and your account's no-reply address — so they carry your avatar in the history.

The builder

Beside Publish in the builder you'll see the GitHub mark: muted ("Connect") when the site isn't linked, the repository name with a dot when it is — green in sync, amber while a commit is on its way, red if the last sync failed. Click it: a popover shows the newest commits on your branch (message, when, who), Sync now, and the links to the repository and the card. From the card you can also open the repository in a GitHub Codespace.

Every new site starts on GitHub

Creating a site ends with GitHub: the New website dialog takes your idea and your brief first (or your template and a name, from the gallery), then — as its last step — asks you to connect your account (once). The moment you're back, DevDojo creates a private repository for the site, named from your site's name (harbor-light-coffee; if that name is taken, -2), and starts the build without another click. Already connected? That step happens by itself. The site is linked to the repository from its first save. Only when GitHub won't accept the name does the dialog ask you to pick one.

Left the dialog on that last step? Everything you wrote is saved. We email you a link that brings you straight back to it — after an hour, a day, and three days — and the reminders stop the moment you connect GitHub or create a site.

Your first site build is on us

Developers who connect GitHub get their first site build free — the full agent-built site, no credits spent — the moment the account connects. The Build a custom website option says First site build on us: pick it, write your brief, connect GitHub at the last step, and the build starts for free. A card in the bottom-right corner of the dashboard carries the offer (Connect GitHub) until it's earned. After your first quick build, the editor also shows you what a Premium build adds and offers the same door. The offer is for established GitHub accounts (at least 30 days old, with a public repository or a follower), and it is granted once. If you signed in to DevDojo with GitHub, the create dialog tells you before you connect whether your account qualifies.

No GitHub, or a brand-new GitHub account? You still get your first build free: sign up with your email, verify it, write a real brief for a real website, and the build is on us — once per person. (We check briefly that the address and the brief are genuine; a build costs us real money.) Connect GitHub whenever you like so the code lives in your own repository.

Connected, but your account doesn't qualify yet? You keep the repository and your brief, and the dialog tells you exactly what happens next: a new account qualifies on a known day — we check every day and email you that morning with a link that starts the build in one click; an account with no public repository or follower qualifies as soon as it has one — add one on GitHub and the same daily check emails you. Or build right away on a plan, or start from a template instead. No site or repository is needed to earn the build — linking comes whenever you're ready.

Unlinking

Unlink repository on the card stops the syncing. The repository, and every commit in it, stays on GitHub.

App Mode sites are not synced yet — their source lives in the app workspace. Use Export source to keep a copy.

© 2026 DevDojo Edit this page