Publishing
«Сохранить» (Save) keeps edits in the CMS. «Опубликовать» (Publish) makes the saved version the published one: the CMS’s open address serves it, and the site is built with it. How the site is then updated on its hosting is chosen by the CMS’s administrator in the site’s settings. Publishing works while the site is paid for — paying for sites.
Published content
Section titled “Published content”The build takes the content from the CMS at an open address — without passwords:
GET https://<CMS>/api/sites/<site>/publishedIt holds only the published version: edits saved but not published do not get there. Before the first publication it is the site’s initial content; the same while the CMS does not know the site yet (for example, at the first build of a site connected from its repository). In the site’s code it is site.loadPublishedContent().
Photos uploaded to the CMS are there at the addresses /media/<site>/…. A static build copies the ones its pages show; a site on a server serves them through a route the integration adds.
Four ways to update the site
Section titled “Four ways to update the site”In the CMS: Сайты (Sites) → the site’s Настройки (Settings) → the «Публикация» (Publishing) section → the site’s GitHub repository, the branch, the token and «Как выкладывать сайт при публикации» (How to deploy the site on publishing):
- «Не выкладывать» (Do not deploy) — the site takes the published content at its next build.
- «Сайт берёт контент сам» (The site takes the content itself) — for a site that renders pages on request: on Seamlet’s preview or built on its own server. A publication starts nothing, and the site shows it within half a minute. A site connected from its repository starts with this way.
- «Запускать workflow GitHub Actions» (Run a GitHub Actions workflow) — the CMS runs a workflow in the site’s repository, and the workflow builds and deploys the site.
- «Собирать в CMS и выкладывать на хостинг по SFTP или FTP» (Build in the CMS and upload to the hosting over SFTP or FTP) — the CMS’s builder builds the site and uploads it to an ordinary hosting. This way exists only if the builder runs on the CMS’s server.
Apart from that you can turn on «Хранить копию контента и фото в репозитории» (Keep a copy of the content and photos in the repository), so that the content does not live on the CMS’s server alone.
The «Подключить» (Connect) button (later «Сохранить и проверить», Save and check) saves the settings only when GitHub finds the branch and the workflow with this token. Without a repository «Опубликовать» only changes what /published serves.
Updating the site without GitHub
Section titled “Updating the site without GitHub”A site the developer connected themselves is updated from the «Обновление сайта» (Updating the site) section of its settings, with no repository or token:
- «Сайт сам запрашивает контент у CMS» (The site asks the CMS for its content) — for a site that renders its pages on request (Vercel, Netlify, your own server with an adapter). Publishing starts nothing: the edit is on the site within a minute.
- «Вызывать адрес сборки на хостинге» (Call the build address at the hosting) — for a static site. Vercel, Netlify and Cloudflare Pages give a build address (deploy hook): paste it, and after publishing the CMS calls it, at most once every half a minute, and the hosting rebuilds the site. The address is a secret: once saved, the page shows only the hosting’s name and the last four characters. Only an
https://address without a port is taken. - «Как настроено в публикации» (As set up in publishing) — removes the choice of this section: the site is updated the way the «Публикация» (Publishing) section sets up.
The line «Сейчас действует» (In force now) says which way works. A choice in «Обновление сайта» overrides the «Публикация» section, and that section says so.
The GitHub token
Section titled “The GitHub token”With the token the CMS works only with the site’s repository. On GitHub: Settings → Developer settings → Fine-grained tokens → Generate new token.
- Resource owner — the owner of the site’s repository (an account or an organization). An organization may require approving the token — then its owner approves it.
- Expiration — how long it lives. When it expires, publishing says the token does not fit, and you need to create it again.
- Repository access → Only select repositories → the site’s repository.
- Permissions → Repository permissions:
- Contents: Read and write — for the copy of the content; Read — for the CMS’s builder to download the site;
- Actions: Read and write — for the workflow.
- Generate token and copy it: GitHub shows the token only once.
The token and the hosting password are kept only on the CMS’s server; pages see only the last four characters of the token.
The site’s workflow
Section titled “The site’s workflow”The workflow is started by hand — through workflow_dispatch — which is how the CMS starts it:
name: Deploy
on: workflow_dispatch:
jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 24 cache: npm - run: npm ci - run: npm run build # then deploy dist/ to the site's hosting, for example over SFTPThe CMS does not run the workflow needlessly: it waits until the previous run ends, does not repeat it for a version already deployed (unless its deployment failed) and runs it no more often than once in 30 seconds. A run whose progress the CMS can no longer learn (the settings changed, the run is gone, the token was revoked, two hours passed) counts as lost and does not hold publishing up.
The CMS builder
Section titled “The CMS builder”For a site that lies as static files on an ordinary hosting (Beget, Timeweb, REG.RU — Russian hosting providers — and others), without CI of its own. The builder downloads the branch, installs the dependencies (npm ci, without their install scripts), builds the site (npm run build) with the published content of this CMS and uploads dist/client or dist to the site’s folder on the hosting.
- In the settings — the protocol, the server address, the port, the login, the password and the site’s folder. SFTP or FTP with TLS fit; plain FTP sends the password as plain text and is not supported.
- On saving, the CMS remembers the SFTP server’s key. If it changes, deployment stops.
- The builder does not touch the hosting’s own files (for example,
.htaccess): it removes only what it uploaded itself the previous time. - Builds run one at a time, each with a time limit. The site’s settings show the latest deployment and the end of the log if the build failed.
The same builder builds the preview if the CMS serves it.
A copy of the content
Section titled “A copy of the content”If it is on, every publication is one commit to the site’s branch: seamlet/content.json (the site, the version, when it was published, and the content) and the photos of the content in seamlet/media/. The commit message carries [skip ci], so the copy alone deploys nothing. How the latest copy went is shown in the site’s settings; a failed copy does not cancel the publication.
If the CMS does not answer
Section titled “If the CMS does not answer”From @seamlet/astro 2.13.0 a site with a copy builds without the CMS. If the CMS does not answer within 30 seconds, does not answer at all or answers with a 5xx error, site.loadPublishedContent() takes the content from seamlet/content.json, checks it against the site’s schema and says so once in the build log. Photos the CMS did not give come from seamlet/media/.
- If the CMS answers that it does not know the site, the build takes the initial content, as before.
- Any other refusal of the CMS stops the build, as before. A build without a copy stops too.
SEAMLET_CONTENT=copyin the build’s environment takes only the copy and does not ask the CMS. This is for a site that left Seamlet.
If the copy was never on, the files for it are in the archive the CMS downloads: the site’s Настройки (Settings) → «Ваши данные» (Your data) → «Скачать всё содержимое» (Download all content). Unpack it at the root of the site’s repository: seamlet/content.json and seamlet/media/ land where they belong. Beside them is saved-content.json, the saved edits that are not published yet.
What the owner sees
Section titled “What the owner sees”After «Опубликовать» the editor shows how the update goes: «Сайт обновляется…» (The site is updating…), «Опубликовано, сайт обновлён» (Published, the site is updated) or «Сайт не обновился» (The site was not updated) with the button «Опубликовать ещё раз» (Publish again). An administrator sees the reason and a link to the run, a client a request to write to the administrator.
With «Сайт берёт контент сам» (The site takes the content itself) the editor writes «Опубликовано» (Published) right after publishing and gives the link «Открыть сайт» (Open the site).
Until deployment is set up, the site does not update by itself: the editor warns about it before publishing, and after it writes «Сайт не обновился» — to an administrator with the link «Настроить выкладку» (Set up deployment), to a client with a request to write to the administrator.
How it looks to the owner is in the guide.