diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9c97eba..89f3ee2 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -46,15 +46,15 @@ jobs: run: sphinx-build --fail-on-warning --keep-going -b html docs docs/_build/html - name: Upload docs artifact (PR/debug) - if: always() + if: always() && hashFiles('docs/_build/html/**') != '' uses: actions/upload-artifact@v4 with: name: docs-html path: docs/_build/html - if-no-files-found: error + if-no-files-found: warn - name: Upload Pages artifact - if: github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) + if: github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && hashFiles('docs/_build/html/**') != '' uses: actions/upload-pages-artifact@v3 with: path: docs/_build/html