diff --git a/.github/workflows/ci_docs.yml b/.github/workflows/ci_docs.yml index 5cf865b8bbb..b6edd354fb7 100644 --- a/.github/workflows/ci_docs.yml +++ b/.github/workflows/ci_docs.yml @@ -173,7 +173,15 @@ jobs: mv latex/pygmt.pdf pygmt-docs.pdf cd ../.. - - name: Upload PDF as artifact for previewing on pull requests + - name: Upload the documentation to ReadTheDocs for PR preview + uses: readthedocs/upload-action@f1f5bac5fc97073927100367d8a5bb22587e1e16 # main + if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && matrix.os == 'ubuntu-latest' + with: + token: ${{ secrets.READTHEDOCS_TOKEN }} + project-slug: pygmt-dev + html: doc/_build/html + + - name: Upload PDF as artifact for PR preview uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 if: github.event_name == 'pull_request' && matrix.os == 'ubuntu-latest' with: