Skip to content

Commit 5f7189d

Browse files
committed
ensure pages only deployed via main
1 parent 41375b3 commit 5f7189d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/update-docs.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,9 @@ jobs:
8787
restore-keys: |
8888
mkdocs-material-
8989
- run: pip install -r .github/workflows/mkdocs/requirements.txt
90-
- run: mkdocs gh-deploy --force -c -b gh-pages
90+
- name: Build and deploy docs (main branch)
91+
if: github.ref == 'refs/heads/main'
92+
run: mkdocs gh-deploy --force -c -b gh-pages
93+
- name: Build docs only (other branches)
94+
if: github.ref != 'refs/heads/main'
95+
run: mkdocs build

0 commit comments

Comments
 (0)