diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index adf43c2a7..06c1c29e0 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -12,7 +12,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: "3.10" - name: Install and configure Poetry uses: snok/install-poetry@v1 with: @@ -37,9 +37,9 @@ jobs: poetry run make html - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 - if: ${{ github.event_name == 'push' }} + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} with: publish_branch: gh-pages github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: docs/_build/html - force_orphan: true \ No newline at end of file + force_orphan: true