Skip to content

Commit f706c01

Browse files
committed
fix: Prevent documentation builds entirely on non-main branche
1 parent 0b21832 commit f706c01

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ env:
1919
jobs:
2020
docs:
2121
name: Documentation
22+
# Only run this job on the main branch
23+
if: github.ref == 'refs/heads/main'
2224
runs-on: ubuntu-latest
2325
environment:
2426
name: github-pages
@@ -65,16 +67,14 @@ jobs:
6567
continue-on-error: true
6668

6769
- name: Setup Pages
68-
if: github.ref == 'refs/heads/main'
6970
uses: actions/configure-pages@v4
7071

72+
# Upload the 'github-pages' artifact
7173
- name: Upload artifact
72-
if: github.ref == 'refs/heads/main'
7374
uses: actions/upload-pages-artifact@v3
7475
with:
7576
path: ./target/doc
7677

7778
- name: Deploy to GitHub Pages
78-
if: github.ref == 'refs/heads/main'
7979
id: deployment
8080
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)