Skip to content

Commit e451890

Browse files
committed
ci(docs): only upload artifacts when html output exists
1 parent a5da4c3 commit e451890

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
@@ -46,15 +46,15 @@ jobs:
4646
run: sphinx-build --fail-on-warning --keep-going -b html docs docs/_build/html
4747

4848
- name: Upload docs artifact (PR/debug)
49-
if: always()
49+
if: always() && hashFiles('docs/_build/html/**') != ''
5050
uses: actions/upload-artifact@v4
5151
with:
5252
name: docs-html
5353
path: docs/_build/html
54-
if-no-files-found: error
54+
if-no-files-found: warn
5555

5656
- name: Upload Pages artifact
57-
if: github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
57+
if: github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && hashFiles('docs/_build/html/**') != ''
5858
uses: actions/upload-pages-artifact@v3
5959
with:
6060
path: docs/_build/html

0 commit comments

Comments
 (0)