Documentation menuGitHub Copilot to production
Deploy

How to deploy a website built with GitHub Copilot

Built your site with GitHub Copilot or its coding agent? Get the code onto a host, fix what differs in production, and go live on your own domain.

AI builders8 min read

The short version

GitHub Copilot writes code with you, in your editor or as an agent on GitHub, but it doesn't host your website. Whichever way you used it, you end up with an ordinary project: a React or Next.js app, a Python or Node server, sometimes one HTML page. To put it in production, get the code onto GitHub or into a ZIP, fix the few things that behave differently on a server, and deploy it to a host.

OptionGood forWhat to know
ProHostivaFront ends and servers alike, with HTTPS and your domain in one placeA paid plan. We check your project for free first, and can publish it and connect your domain for you.
Front-end platforms (Vercel, Netlify, Cloudflare Pages…)Static sites, React or Vue apps, Next.jsFree tiers (read their terms for commercial use). Long-running servers, Python and PHP are limited or not offered.
App platforms or your own server (Render, Railway, Fly.io, a VPS…)Servers, background jobs, full controlMore to set up yourself. On your own server, updates, security, backups and HTTPS are yours to look after.

Not sure your project is ready?

Whichever host you pick, run the free production readiness check first. It runs the production build and lists what to fix. No account needed.

1. Find where your code is

You usedWhere the code isWhat to do
Copilot in your editor (chat, edits or agent mode)In a folder on your computerCommit and push it to GitHub, or zip the folder. See Deploying from a ZIP.
Copilot coding agent (on GitHub)In your GitHub repository. The agent works on a branch and opens a pull request with its changes.Review the pull request and merge what you want to keep. The host deploys a branch, usually main, so work that isn't merged isn't included.

The agent's environment isn't your hosting

Secrets you set up for the coding agent's environment are for the agent's own work on your repository. They don't configure your host: add the production values there as environment variables.

2. Have Copilot make it production-ready

Give Copilot a task like this one, in agent mode in your editor, or as an issue you assign to the coding agent (then review its pull request before merging):

Prepare this project for production hosting. The host builds from the
repository root, runs one container, sets the PORT environment variable
and provides secrets as environment variables. Please:
- make the app listen on PORT
- move every secret and API key into environment variables, and list
  their names (without values) in .env.example
- make sure .env is in .gitignore
- read the database URL from an environment variable instead of
  pointing at localhost
- make sure there is a production build and a start command
- make the home page / return a normal page without a login
Don't deploy anything. Change the code and list what you changed.

Keep it that way with custom instructions

Copilot follows repository custom instructions in .github/copilot-instructions.md, and the coding agent also reads AGENTS.md. Add a few lines to one of them so later changes don't undo the work:

## Deployment
- Production builds from the repository root and runs as one container.
- The app must listen on the PORT environment variable.
- Secrets and URLs come from environment variables; never commit .env.
- Add every new variable name to .env.example.
- The home page / must answer without a login.
The .github folder and AGENTS.md are never served on ProHostiva, even on a plain HTML site where every other file in the folder is published.

Project layouts to watch for

  • Separate front-end and back-end folders (such as frontend/ and backend/). ProHostiva builds the top level of a repository or ZIP, so put each part in its own repository and deploy them as two websites, or ask Copilot to make the backend serve the built front end so it's one app.
  • A Docker Compose file with a database next to the app (docker-compose.yml). Multi-container setups aren't supported: deploy the app on its own and use a hosted database such as Supabase or Neon.
  • A Dockerfile at the top level is always used when it's there. If it was written for development, ask Copilot to make it production-ready or remove it, and we'll build the project ourselves.

3. Deploy it with ProHostiva

  1. Check it (free)

    Paste your repository's address into Check my project, or upload the ZIP. Anything the report flags can usually be handed straight to Copilot as a task or an issue.

  2. Start a new website

    In your dashboard, click Host a website, then choose GitHub repository and connect GitHub, or upload the ZIP. Pick the branch your merged work is on. See Deploying from GitHub.

  3. Check what we detected

    We show the framework, the runtime version and the build and start commands. Change a command only if you know it's different.

    The Project detected card: React and Vite on Node.js 22 with npm, deployed as a static site, with the install command, build command and output directory filled in, and a Publish button.
  4. Add environment variables

    Everything in your .env.example goes under Developer settings → Environment variables, with production values. Tick Secret for anything private.

    The Environment variables panel: a key and a value field with the Secret box ticked, and two saved variables whose values are hidden.
  5. Publish

    Name the website, choose its address and click Publish website. We build it in an isolated container, check that the home page answers, and put it online at yourname.prohostiva.com.

Connect your domain

Go to Domains in your dashboard, add your domain and choose the website. We then show the exact records for it, each with a copy button. For yourshop.com, they look like this:

TypeNameValueWhat it does
TXT_prohostivaprohostiva-verify= followed by your domain's own codeProves the domain is yours. Keep it after verifying.
A@, or empty (the domain itself)The IP address shown in your dashboardPoints the domain at the server your website runs on.
ProHostiva Domains page for yourshop.com, showing the TXT record at _prohostiva.yourshop.com and the A record to add at the domain provider, each with a copy button.

Add them where you manage your domain's DNS (usually where you bought it), click Verify DNS, and HTTPS is set up automatically. The full walkthrough is in Connecting your own domain.

The domain yourshop.com in ProHostiva after verifying: status Active, SSL active and DNS verified, with a link to open the site over HTTPS.

Want www.yourshop.com too?

Add it as a second domain and connect it to the same website. Its records are a TXT at _prohostiva.www and a CNAME at www pointing at your website's own address, such as yourname.prohostiva.com (or an A record, as above).

Updating the site later

Keep working with Copilot as before. When the changes are on your deployed branch (merged from the agent's pull request, or pushed from your computer), click Publish latest version on the website's page. Nothing goes live until you click, and if a new version fails to build or start, the current one stays online.

The Publish panel on a website's page: the connected GitHub repository and branch, the Live status, and the Publish latest version button.

Rather we did it?

Not technical, or short on time? Create your account and email support@prohostiva.com with your GitHub repository (or the ZIP) and your domain. We'll publish the website and connect the domain for you. Setup help is free on every plan.

Before you send people to it

  • Rotate any key that was ever committed. Deleting it from the code isn't enough if it's in the Git history; create a new one at the service and set it as an environment variable.
  • Allow your domain where your code or its services expect known addresses: Django's ALLOWED_HOSTS, an API's CORS origins, and sign-in redirect URLs at Google, GitHub, Supabase or Auth0.
  • Switch services to production: Stripe live keys and a webhook pointing at your domain, a production database rather than a test one, real email settings.
  • Run your database migrations. They're never run automatically on deploy.

Common problems

  • The live site doesn't have Copilot's latest changes: the agent's pull request isn't merged into your deployed branch yet, or the website deploys a different branch. Merge it, then click Publish latest version.
  • It works on my computer but the build fails: often a file that was never committed, a missing lockfile, or a package the agent's setup steps installed but your project doesn't list. Add it to package.json or requirements.txt and deploy again.
  • Health check failed: the app listens on a fixed port instead of PORT, or the home page redirects to a login. See Troubleshooting.
  • "We couldn't find a website or app here": the project is in a subfolder. See the layouts above.
  • Database connection errors: the database URL still points at localhost. Use your hosted database's URL in an environment variable.
  • A blank page (React, Vue, Svelte): a missing VITE_ variable. Add it and deploy again.

If your domain won't connect

  • Not verified yet: new records usually work within minutes but can take up to 48 hours. Clicking Verify DNS too early does no harm: try again later.
  • "Ownership confirmed, but the domain doesn't point at ProHostiva yet": the TXT record is right but the A record isn't. Look for another A, AAAA or CNAME record with the same name, often left by your previous host, delete it and keep only ours.
  • The record name has your domain in it twice (_prohostiva.yourshop.com.yourshop.com): your provider adds the domain for you. Change the name to just _prohostiva.
  • Using Cloudflare? Set the A or CNAME record to DNS only (grey cloud), not Proxied. Otherwise the domain can't be verified and HTTPS can't be set up.
  • The bare domain works but www doesn't (or the other way round): each one is its own domain. Add the missing one in Domains and connect it to the same website.
  • A certificate warning on the very first visit: the certificate is issued once the domain is verified, which can take a minute or two. Reload after that.
  • Still stuck? See Troubleshooting, or email support@prohostiva.com with the domain and we'll look.