Suggested by @ber2 in the review of #193, which asked whether this repository is mixing two artifacts: the code that builds the site, and the built site.
It is, and they are separated as two branches rather than two repositories. edition holds the source and master holds the build, written by the github-pages workflow with peaceiris/actions-gh-pages and force_orphan: true, so master is a single commit replaced on each deploy rather than a history that grows. GitHub Pages serves from that branch.
That is not expensive, but it is avoidable. GitHub Pages can take the build as a workflow artifact instead, with actions/upload-pages-artifact and actions/deploy-pages. The build would then never be committed anywhere.
What it would change
- The 691 blobs and about 72 MB of build output that
master carries would not be in the repository at all. A clone would fetch only the source.
- Nothing would write to a branch on our behalf. The workflow currently force-pushes an orphan commit on every merge.
- The deployment becomes a GitHub environment, with its own history and its own protection rules, instead of a branch write.
master could be deleted.
What it needs, and the one trap
The repository setting has to move from "Deploy from a branch" to "GitHub Actions", which is manual and is the step that makes the change visible.
The custom domain is the trap. CNAME exists at the root of edition but is not copied into the build: the deploy action injects it through its cname: pybcn.org input. Drop that action without replacing it and the built site has no CNAME, which is how a Pages site loses its custom domain. Moving the file to static/CNAME is the fix, and it has to be in the same change rather than after it.
Worth doing, not urgent, and best done when someone can watch the deploy.
Suggested by @ber2 in the review of #193, which asked whether this repository is mixing two artifacts: the code that builds the site, and the built site.
It is, and they are separated as two branches rather than two repositories.
editionholds the source andmasterholds the build, written by thegithub-pagesworkflow withpeaceiris/actions-gh-pagesandforce_orphan: true, somasteris a single commit replaced on each deploy rather than a history that grows. GitHub Pages serves from that branch.That is not expensive, but it is avoidable. GitHub Pages can take the build as a workflow artifact instead, with
actions/upload-pages-artifactandactions/deploy-pages. The build would then never be committed anywhere.What it would change
mastercarries would not be in the repository at all. A clone would fetch only the source.mastercould be deleted.What it needs, and the one trap
The repository setting has to move from "Deploy from a branch" to "GitHub Actions", which is manual and is the step that makes the change visible.
The custom domain is the trap.
CNAMEexists at the root ofeditionbut is not copied into the build: the deploy action injects it through itscname: pybcn.orginput. Drop that action without replacing it and the built site has noCNAME, which is how a Pages site loses its custom domain. Moving the file tostatic/CNAMEis the fix, and it has to be in the same change rather than after it.Worth doing, not urgent, and best done when someone can watch the deploy.