Skip to content

Commit 292220e

Browse files
authored
Fix GitHub pages publishing. (#342)
It turns out GitHub workflows won't trigger based on the actions of other workflows. In this particular case, the release workflow pushing to the `stable` branch doesn't trigger the GitHub Pages publishing even though if a human pushed to that branch, it would run. This change removes the dedicated GitHub Pages publishing workflow and instead integrates the GitHub Pages publishing directly into the Release workflows.
1 parent 38013d7 commit 292220e

File tree

4 files changed

+37
-36
lines changed

4 files changed

+37
-36
lines changed

.github/workflows/github-pages-publishing.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Publish GitHub pages
2+
3+
permissions: {}
4+
5+
on:
6+
workflow_call: {}
7+
8+
jobs:
9+
deploy:
10+
name: Publish GitHub pages
11+
permissions:
12+
pages: write
13+
id-token: write
14+
environment:
15+
name: github-pages
16+
url: ${{ steps.deployment.outputs.page_url }}
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: deploy to GitHub pages
20+
id: deployment
21+
uses: actions/deploy-pages@v4

.github/workflows/release-minor-version.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ permissions:
88
contents: write
99
# Publish to GHCR.
1010
packages: write
11-
# "Keyless" container signing and Azure login.
11+
# "Keyless" container signing, Azure login, GitHub pages publish.
1212
id-token: write
1313
# Publish PR.
1414
#pull-requests: write
15+
# GitHub pages publish.
16+
pages: write
1517

1618
on:
1719
# Allow pipeline to be run manually.
@@ -46,3 +48,8 @@ jobs:
4648
uses: ./.github/workflows/open-bump-version-pr.yml
4749
needs:
4850
- build
51+
52+
publish-github-pages:
53+
uses: ./.github/workflows/publish-github-pages.yml
54+
needs:
55+
- build

.github/workflows/release-patch-version.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ permissions:
1010
packages: write
1111
# "Keyless" container signing and Azure login.
1212
id-token: write
13+
# GitHub pages publish.
14+
pages: write
1315

1416
on:
1517
# Allow pipeline to be run manually.
@@ -34,3 +36,9 @@ jobs:
3436
isLatestRelease: ${{ needs.build.outputs.isLatestRelease }}
3537
needs:
3638
- build
39+
40+
publish-github-pages:
41+
uses: ./.github/workflows/publish-github-pages.yml
42+
if: ${{ needs.build.outputs.isLatestRelease == 'true' }}
43+
needs:
44+
- build

0 commit comments

Comments
 (0)