From 7ea3f68b33be2721bcb09e7b9d5a441fa318bb0b Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Wed, 8 Nov 2023 18:58:11 +0000 Subject: [PATCH] Add a GitHub Action to inject preview links in PRs This makes easier to review pull requests by providing the preview links in the PR description. --- .github/workflows/pr-preview-links.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/pr-preview-links.yml diff --git a/.github/workflows/pr-preview-links.yml b/.github/workflows/pr-preview-links.yml new file mode 100644 index 0000000000..90ea9cc73a --- /dev/null +++ b/.github/workflows/pr-preview-links.yml @@ -0,0 +1,22 @@ +name: Read the Docs PR preview + +on: + pull_request_target: + types: + - opened + +permissions: + contents: read + pull-requests: write + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + documentation-links: + runs-on: ubuntu-latest + steps: + - uses: readthedocs/actions/preview@v1 + with: + project-slug: "python-packaging-user-guide"