Site admin and automatic deploys
Edit the marketing site, prices and contact details from the dashboard. Every save is a commit to your GitHub repository, and the server rebuilds what changed on its own.
What it is
the Site admin is a section of the dashboard, at /site, for whoever runs the installation. it edits the files the public website is built from:
- Posts — articles, guides and pages (MDX), including images
- Pages — the structured comparison, feature and audience pages (JSON)
- Pricing — the tier table, and the matching products in Polar
- Settings — the announcement bar, the home page hero, the demo link, and the contact details used on the site, in the dashboard and in emails
- Deploys — what is live, what is building, and the build log
it does not write to disk or to the database. every save is a commit to your GitHub repository, made through GitHub's API, and self-hosting/autodeploy on the server notices the commit and rebuilds. so every change has a history and a one-click restore, and an edit in the dashboard and a git push from a laptop cannot silently overwrite each other — if the file changed since you opened it, the save is refused and says so.
every save is checked before it is committed: frontmatter and JSON against the shape the site expects, MDX by compiling it, prices for order and for the absence of a free tier. a save either lands as a working commit or is refused with the reason.
Set it up
Start the deploy timer
on the server, from the self-hosting folder:
./autodeploy --installa systemd timer then checks the branch every minute. when there is a new commit it rebuilds only the services that commit touched — content rebuilds the website (about 10 minutes on a 2-vCPU box), shared packages such as prices rebuild everything (about 40). every image is built before any container is replaced, the previous image is kept, and a service that is not healthy within three minutes is rolled back. a failed build leaves the live site on the previous version.
list every compose file in .env so the timer and plain docker compose agree:
COMPOSE_FILE=docker-compose.yml:docker-compose.build.yml:docker-compose.site.yml:docker-compose.cms.ymlGive it a GitHub token
create a fine-grained personal access token: repository access limited to your repository, and one permission — Contents: read and write. nothing else.
then run the credentials script and fill in the "Site admin" section. the token is typed with hidden input and goes straight into .env:
./set-credentialsit asks for the owner email(s) too. only people signed in with one of those addresses see the Site admin; the API refuses everyone else.
Good to know
- prices and payments are separate. the price list decides what the site shows. checkout sells Polar products. after changing prices, use "Compare with Polar" on the Pricing tab and apply the difference. existing subscribers keep the price they signed up at.
- MDX is code. it can import modules and run expressions at build time, which is why only owners can save it.
- the trial length is set in code, because "30-day free trial" is also written into comparison pages.
- the token expires. when GitHub stops accepting it, the Site admin says so; run
./set-credentialsagain with a new one.