Publishing from CI
The Publish button builds the site on your computer and sends the pages to GitHub. A workflow in GitHub Actions can do the same on GitHub's machines: on every change to a site kept on GitHub, or every hour for a site kept in Google Drive. Nobody has to open SeedPage, and the published site is the same. This page is for administrators who know their way around GitHub.
The workflow writes the pages where the Publish button writes them: the docs folder of the main branch of the repository of the pages, which GitHub Pages serves. Both can be used on the same site; whichever ran last is what is online.
What the workflow does
- Fetches SeedPage itself from its public repository, and Node.js 22.
- Builds the site with node seedpage/src/build-site.js, from the folder of the sources or from the Drive folder, into dist.
- Replaces the docs folder of the repository of the pages with dist, and commits when something changed. GitHub Pages then publishes it.
If the site has a domain of your own, the published pages need a CNAME file holding it, as the Publish button writes: add echo clearaccounts.com > dist/CNAME before the pages are copied, with your domain.
A site kept on GitHub, everything public
When the site was made with Everything public, one repository holds the sources at its root and the published pages in docs. Add this file to it as .github/workflows/publish.yml:
