chore(ci): Also rebuild Pages on main pushes for content edits

Adds push: [main] alongside workflow_dispatch so edits to README.md, _config.yml, _layouts, or the CHANGELOG.md template publish without a manual dispatch. The chain step in release-tag.yml still runs after release publish to guarantee the new release is in site.github.releases by the time Pages rebuilds — concurrency: cancel-in-progress: false serialises the two runs.

Adds an if: github.ref == 'refs/heads/main' guard on the deploy job so workflow_dispatch from a non-main branch builds for verification but doesn't deploy.
This commit is contained in:
darken
2026-04-28 12:08:23 +02:00
committed by Matthias Urhahn
parent ea3ef1ff3b
commit b04e1fe628
+3
View File
@@ -1,6 +1,8 @@
name: Deploy GitHub Pages
on:
push:
branches: [ main ]
workflow_dispatch:
permissions:
@@ -42,6 +44,7 @@ jobs:
deploy:
name: Deploy to GitHub Pages
needs: build
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-22.04
permissions:
pages: write