Skip to content

Commit 081a34b

Browse files
committed
ci: fix automatic documentation update on main push
1 parent e820b4d commit 081a34b

2 files changed

Lines changed: 10 additions & 15 deletions

File tree

.github/workflows/publish-antora-docs.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,22 @@
22
name: "publish-antora-docs"
33

44
on:
5-
pull_request:
5+
push:
6+
branches:
7+
- main
68
paths:
7-
- "docs/**"
9+
- "version.txt" # Trigger a build when the version changes in order to take the version tag into account
810

911
schedule:
1012
# Every day at 3:00 AM in order to generate documentation for every module that had a new release
1113
- cron: "0 3 * * *"
1214

13-
workflow_call:
14-
15-
workflow_dispatch:
15+
pull_request:
16+
paths:
17+
- "docs/**"
1618

19+
workflow_call:
20+
1721
jobs:
1822
publish-antora-docs:
1923
runs-on: ubuntu-latest
@@ -37,7 +41,7 @@ jobs:
3741
path: ${{ github.workspace }}/public/docs
3842

3943
- name: "Deploy documentation to GitHub Pages"
40-
if: github.ref_name == 'main' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call')
44+
if: github.ref_name == 'main' && (github.event_name == 'pull' || github.event_name == 'schedule' || github.event_name == 'workflow_call')
4145
uses: JamesIves/github-pages-deploy-action@v4.4.1
4246
with:
4347
branch: gh-pages

.github/workflows/release-please.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,3 @@ jobs:
1717
release-type: simple
1818
pull-request-title-pattern: "chore: release ${version}"
1919
bump-minor-pre-major: true
20-
21-
outputs:
22-
release_created: ${{ steps.release-please.outputs.release_created }}
23-
24-
publish-documentation:
25-
needs:
26-
- release-please
27-
if: needs.release-please.outputs.release_created
28-
uses: "./.github/workflows/publish-antora-docs.yaml" # Call the Antora documentation workflow

0 commit comments

Comments
 (0)