Skip to content

Commit 85282a1

Browse files
committed
ci: extend workflow to validate builds on PRs
Renames publish-docs to continuous-delivery and extends it to build documentation on all pull requests. This ensures that builds are validated before merging while maintaining the same deployment behavior for the main branch. The deploy job runs conditionally only when on the main branch, supporting both push events and manual workflow_dispatch. Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
1 parent 3ea1724 commit 85282a1

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
# This workflow builds and deploys the Docusaurus documentation to GitHub Pages
2-
# when changes are pushed to the main branch.
3-
name: Deploy Docusaurus to GitHub Pages
1+
# This workflow builds the Docusaurus documentation on pull requests
2+
# and deploys it to GitHub Pages when changes are pushed to main.
3+
name: Continuous Delivery
44

55
on:
66
workflow_dispatch:
7+
pull_request:
78
push:
89
branches:
910
- main
@@ -38,6 +39,7 @@ jobs:
3839
cache-dependency-path: website/yarn.lock
3940

4041
- name: Setup Pages
42+
if: github.ref == 'refs/heads/main'
4143
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
4244

4345
- name: Install dependencies
@@ -49,11 +51,13 @@ jobs:
4951
run: yarn build
5052

5153
- name: Upload artifact
54+
if: github.ref == 'refs/heads/main'
5255
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4
5356
with:
5457
path: website/build
5558

5659
deploy:
60+
if: github.ref == 'refs/heads/main'
5761
permissions:
5862
pages: write
5963
id-token: write

0 commit comments

Comments
 (0)