Connect your own GitHub to your website
Build your website in your own GitHub repo and host it on TrustPager: connect GitHub (including a GitHub account already used by another workspace), connect a repo, move a TrustPager-built site across, check each push as a preview, and publish.
You can build your website in your own GitHub repo, with Claude Code or any other tool, and have TrustPager host it. Every push builds a preview you can check, and one click makes it the live site. This works in any workspace, not just agencies.
Who can connect GitHub
- Admins of the workspace.
- Owners and systems architects of the agency that looks after the workspace.
You also need to manage the GitHub account you are connecting: its owner, or for an organisation an owner or admin of its repos. Ordinary members can't connect GitHub. If you can't see the buttons below, ask a workspace admin.
1. Connect your GitHub account
Use the Connect button on the GitHub tile at https://app.trustpager.com/settings/integrations, or the Connect GitHub button at the top right of your website's page, which lives at https://app.trustpager.com/growth/websites followed by your website's id (open the website from that list).
TrustPager sends you to GitHub to sign in (the first time, GitHub asks you to authorise TrustPager Sites). Then it sorts itself out:
- If you manage a GitHub account that already has the TrustPager Sites app, for example one you connected to another of your workspaces, it's connected here straight away.
- If not, GitHub asks you to add the app to your account or organisation and choose which repositories TrustPager can access (just the one for your website is fine).
You come back to TrustPager with your account connected. One GitHub account can be used by several workspaces at once.
Once connected, the GitHub tile shows Manage. It lists your accounts, with Disconnect for each and Connect another account if you use more than one account or organisation. An account used by more than one workspace shows Also used by 1 other workspace (or the number of others).
2. Connect a repo to your website
- Open your website's page and click Connect GitHub at the top right.
- In the Connect a repo window, choose the repo and the branch to publish from (usually main).
- Leave Publish automatically off if you want to check each preview first.
- Click Connect repo.
TrustPager works out how to build the site from its package.json. Under Build settings you can choose npm run build or No build (plain HTML) and set the output folder. Put any other build steps in the build script of your package.json.
Moving a TrustPager-built site into your own GitHub
If TrustPager built your site and you want to take it over, create a new, empty repo on GitHub, then switch on Start the repo from this website in the Connect a repo window and click Connect repo.
The click returns straight away with: Connected. The website's code is being copied into your repo now (a few minutes for a big site), then the first preview builds. The copy runs in the background and handles sites of any size up to 2,000 files, so your site moves across exactly as it is. Nothing goes live until you click Publish.
- If the repo already has code in it, the connect is refused. TrustPager never overwrites existing code.
- If the copy stops part way, the repo link is removed and the website's page tells you why. Empty the repo and try again.
- Secrets, installed packages, server code, videos and GitHub settings (the .github folder) are not copied.
3. Push, check the preview, publish
Every push to the branch builds a preview. Pushes within 2 minutes of each other build once. Your live site only changes when you click Publish preview, or straight away if you turned on Publish automatically.
Once a repo is connected, the button at the top right of your website's page shows the repo name and its status. Click it to open the GitHub window, which has:
- Publish preview: makes the latest preview the live site.
- Sync now: builds the branch's latest commit again.
- Publish automatically: a switch. When on, every preview that builds goes live.
- Disconnect repo: stops updates from the repo.
- Build problems: if a build fails, the end of its log is shown. Fix it in your repo and push again.
- History: every version of the site. Click Roll back to this on an earlier published version to put it back live.
Editing with AI on a connected site
You can still use Edit Website with AI on a GitHub-connected site. When you click Publish, the changes are committed straight to your connected branch, and the site goes live once the preview builds. Only if your branch is protected on GitHub does it open a pull request for you to merge instead. More in https://app.trustpager.com/training/help-center/edit-website-with-ai.
Limits
- Websites hosted by TrustPager are static only. A push with a functions folder, a _worker.js file, a _routes.json or a wrangler config is refused, and so is a build that makes server code (for example an Astro page with
prerender = falseor a server adapter such as @astrojs/cloudflare): that preview is deleted and can't be published. For content that changes, like blog posts from your public notepads or your store's products, read it when the site builds: if the build calls TrustPager's website loader (website-loader-public with your site key and for=build), the site rebuilds itself a few minutes after that content changes. - Each repo can have up to 2,000 files and 50 MB. Leave build output and installed packages out of the repo.
- Each workspace can run 20 website builds a day. Each preview and each publish counts as one.
Disconnecting
Disconnecting a repo stops updates from that repo reaching your site. The live site stays exactly as it is, and you can connect again whenever you like.
Disconnecting a whole GitHub account removes it from this workspace only. This workspace's websites built from it stop updating (their live pages stay as they are), other workspaces keep using the account, and nothing changes on GitHub. When the last workspace disconnects an account, the TrustPager Sites app is removed from that GitHub account.
Agencies
Agencies manage client sites from https://app.trustpager.com/agency/websites, which works as before and uses this same system. On a client's site an agency can use the client's own GitHub accounts as well as the agency's. See https://app.trustpager.com/training/help-center/connect-client-website-to-github.
Using it from your own AI assistant
Your AI assistant can do all of this through the TrustPager API and MCP: check the GitHub connection, get a connect link, list repos, connect a website to a repo (including starting it from the site), sync, publish a preview, switch automatic publishing on or off, and disconnect a repo or account. It uses the same website permissions as the screens.
- The connect link signs the person in with GitHub and sorts itself out the same way; a second link goes straight to installing the app on a new account.
- The connection check lists, for each account, the other workspaces using it.
- Disconnecting an account tells you whether other workspaces still use it.
Exact tool and field names are in https://docs.trustpager.com/reference#websites.
Need a hand? Submit a service request at https://app.trustpager.com/settings/service-requests.