Skip to content
Royalman Cloud

Deploy your website from GitHub

Connect a GitHub repository to a website on your hosting plan. We build it and put it live, and every push updates it by itself.

What you get

  • Builds on our servers: we run npm, pnpm or yarn (and pip for Python), so you push your source code, not a built folder.
  • Websites and apps: plain HTML and PHP, React, Vue, Vite, Astro, Angular and other built sites are served as files. Next.js, Nuxt, SvelteKit, Express, NestJS, Flask, FastAPI and Django run as an app.
  • Deploy history and one-click rollback: the newest 3 versions are kept, so you can put an earlier one back in seconds.
  • Deploy logs: see exactly what happened during each install and build, and your app's own output.
  • Secret keys (environment variables) for your build and app, stored encrypted.
  • Preview links: every other branch gets its own address to try changes before they go live.
  • Global CDN: one switch and Cloudflare serves your website from servers near your visitors, everywhere in the world β€” cleared by itself on every deploy.

Connect your repository

  1. You need a hosting plan. Log in and open My account β†’ Hosting.
  2. Under Your websites, press Deploy from GitHub next to the website.
  3. Enter your repository (name/project or its link, e.g. https://github.com/ada/my-shop) and the branch (usually main).
  4. If the repository is private, tick It's a private repository and paste a GitHub token (see below).
  5. Press Connect and deploy. We work out what your project needs, build it and put it live, usually in 1 to 5 minutes.

Most projects need nothing more. If yours is unusual, open Build settings and enter the install, build or start command, or the folder your build makes (e.g. dist).

Private repository: make a read-only token

  1. On GitHub, open Settings β†’ Developer settings β†’ Fine-grained tokens β†’ Generate new token.
  2. Under Repository access, choose Only select repositories and pick just this repository.
  3. Under Repository permissions, set Contents to Read-only. Nothing else is needed.
  4. Generate it, copy the token (it starts with github_pat_) and paste it into the form.

We keep the token encrypted and only use it to read your code. When it expires, open Settings and paste a new one.

Apps (Node.js and Python)

  • Your app must listen on the port in the PORT environment variable. We set it, and Next.js and Nuxt use it by themselves. In Express: app.listen(process.env.PORT).
  • We start it with your start script, a Procfile (web: …), or the usual command for your framework. You can set your own in Build settings.
  • If a new version doesn't start, the one before it keeps running, and the deploy log shows the app's error.
  • Apps get your plan's memory and CPU and restart by themselves if they stop. Choose App output under Logs to see what yours prints.
  • Files your app writes are replaced on each deploy. Keep data in a database.

Secret keys

Open Secret keys under the GitHub box and add a name and value, such as DATABASE_URL or VITE_API_URL. They are passed to your build and your app. Values are never shown again. A change applies from the next deploy, so press Deploy now.

Pushes, history and rollback

  • Every push to your branch goes live within about 3 minutes. To make it instant, open Make it instant, copy the link and add it in GitHub under your repository β†’ Settings β†’ Webhooks β†’ Add webhook as the Payload URL.
  • Deploys lists every deploy with its commit, time and log. Press Roll back to this on an earlier version to put it back live. Your next push goes live as usual.
  • If a push breaks the build, the website keeps the last version that worked, and we email you what went wrong.

Preview links

Tick Preview link for every other branch in Settings. Each branch you push (up to 5) gets its own address, like my-feature--abc123.royalmancloud.com, that updates on every push and goes away when you delete the branch. Previews are for websites that build to files (React, Vue, Astro…), and search engines don't index them.

Global CDN

Under each website in your hosting panel, press Turn on next to Global CDN and choose how long pages are kept (1 minute to 1 day). Cloudflare then answers your visitors from a server near them, in Lagos, London, New York or anywhere else. It's free on every plan.

  • The cache is cleared by itself on every deploy. After uploading files by SFTP, press Clear cache.
  • PHP pages, WordPress pages and its admin always come fresh, so forms, carts and logins keep working. Apps decide for themselves (Next.js static pages are kept).

Good to know

  • Connecting replaces whatever is in the website's folder. If there's something to keep, press Back up now in the panel first.
  • Builds get 15 minutes and 1.5 GB of memory. A repository can be up to 1 GB, and a built app up to 2 GB.
  • Disconnect stops the updates and leaves the website as it is.
  • It isn't available on websites running WordPress.

See hosting plans Open my hosting

Still stuck? Contact support.

Chat with us