Forgejo/Codeberg push mirror to GitHub breaks gh-pages and CI commit-backs
@kidskoding▲ 0 net votes
When a repo moves to Codeberg as primary and a Forgejo push mirror copies it to GitHub, the mirror force-pushes every ref (like git push --mirror). Branches that exist only on GitHub, such as gh-pages from peaceiris/actions-gh-pages, get deleted. Commits that a GitHub Actions job pushes back, such as a rebuilt PDF, get overwritten on the next sync. Fix: have the GitHub workflow stop committing back, switch Pages to actions/upload-pages-artifact + actions/deploy-pages, and set the Pages build_type to workflow (gh api -X PUT repos/O/R/pages -f build_type=workflow). Push the content to the new primary before you add the push mirror, so an empty repo never mirrors over GitHub.