From 96dde53db6385d74ee8d8b817d6a779049ce2142 Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Tue, 29 Nov 2022 14:57:01 -0800 Subject: [PATCH 1/2] Use centralized sync-rtd-redirects workflow A central copy is easier to maintain over time now that this workflow is proliferating across our repos. --- .github/workflows/sync-redirects.yaml | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/.github/workflows/sync-redirects.yaml b/.github/workflows/sync-redirects.yaml index d683c4568..91ac90dd7 100644 --- a/.github/workflows/sync-redirects.yaml +++ b/.github/workflows/sync-redirects.yaml @@ -15,18 +15,10 @@ jobs: sync: # Prevent this job from running on forks. if: github.repository_owner == 'nextstrain' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - - - name: Upgrade Python toolchain - run: python3 -m pip install --upgrade pip setuptools wheel - - - name: Install readthedocs-cli - run: python3 -m pip install readthedocs-cli - - - name: Sync redirects - run: rtd projects nextstrain-ncov redirects sync -f docs/redirects.yaml --wet-run - env: - RTD_TOKEN: ${{ secrets.RTD_TOKEN }} + name: rtd redirects + uses: nextstrain/.github/.github/workflows/sync-rtd-redirects.yaml@master + with: + project: nextstrain-ncov + file: docs/redirects.yaml + secrets: + RTD_TOKEN: ${{ secrets.RTD_TOKEN }} From c1ced4f72e944be1aaf89b10cbaa5dfddd2a7d7a Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Tue, 9 Apr 2024 16:23:48 -0700 Subject: [PATCH 2/2] Trigger on pull request The centralized workflow now supports dry runs for PRs. Co-authored-by: Thomas Sibley --- .github/workflows/sync-redirects.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/sync-redirects.yaml b/.github/workflows/sync-redirects.yaml index 91ac90dd7..bbad23c45 100644 --- a/.github/workflows/sync-redirects.yaml +++ b/.github/workflows/sync-redirects.yaml @@ -8,6 +8,11 @@ on: - docs/redirects.yaml - .github/workflows/sync-redirects.yaml + pull_request: + paths: + - docs/redirects.yaml + - .github/workflows/sync-redirects.yaml + # Manually triggered using GitHub's UI workflow_dispatch: