diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 17dde7b..dd461ae 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -2,8 +2,7 @@ name: Documentation on: push: - branches: - - main + pull_request: jobs: deploy: @@ -31,5 +30,8 @@ jobs: cp --recursive /tmp/docs/. . echo /node_modules > .gitignore git add --all - git commit --all --message ":memo: docs: Update generated documentation" + git commit --all --message ":memo: docs: Update generated documentation" || echo "No changes to commit" + - name: push documentation (main branch only) + if: github.ref_name == 'main' + run: | git push origin gh-pages