Skip to content

Commit

Permalink
Merge pull request #1034: dev: Use centralized sync-rtd-redirects wor…
Browse files Browse the repository at this point in the history
…kflow
  • Loading branch information
victorlin authored Apr 9, 2024
2 parents c72d46b + c1ced4f commit c3dfb15
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions .github/workflows/sync-redirects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,22 @@ 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:

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 }}

0 comments on commit c3dfb15

Please sign in to comment.