diff --git a/.github/workflows/sync-redirects.yaml b/.github/workflows/sync-redirects.yaml new file mode 100644 index 000000000..68cda8bc5 --- /dev/null +++ b/.github/workflows/sync-redirects.yaml @@ -0,0 +1,30 @@ +name: Sync RTD redirects + +on: + push: + branches: + - master + paths: + - docs/redirects.yaml + - .github/workflows/sync-redirects.yaml + + # Manually triggered using GitHub's UI + workflow_dispatch: + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + + - 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-augur redirects sync -f docs/redirects.yaml --wet-run + env: + RTD_TOKEN: ${{ secrets.RTD_TOKEN }} diff --git a/docs/redirects.yaml b/docs/redirects.yaml new file mode 100644 index 000000000..4ea3e6d2e --- /dev/null +++ b/docs/redirects.yaml @@ -0,0 +1,57 @@ +# Authoritative list of redirects we have configured in RTD. See the +# docs.nextstrain.org repo's README.md¹ for more information on maintaining +# redirects. +# +# ¹ https://github.com/nextstrain/docs.nextstrain.org#configuring-redirects +--- +- type: page + from_url: /faq/augur_snakemake.html + to_url: https://docs.nextstrain.org/en/latest/guides/bioinformatics/augur_snakemake.html + +- type: page + from_url: /faq/colors.html + to_url: https://docs.nextstrain.org/en/latest/guides/bioinformatics/colors.html + +- type: page + from_url: /faq/community_hosting.html + to_url: https://docs.nextstrain.org/en/latest/guides/share/community-builds.html + +- type: page + from_url: /faq/fasta_input.html + to_url: https://docs.nextstrain.org/en/latest/guides/bioinformatics/fasta_input.html + +- type: page + from_url: /faq/import-beast.html + to_url: https://docs.nextstrain.org/en/latest/guides/bioinformatics/import-beast.html + +- type: page + from_url: /faq/lat_longs.html + to_url: https://docs.nextstrain.org/en/latest/guides/bioinformatics/lat_longs.html + +- type: page + from_url: /faq/seq_traits.html + to_url: https://docs.nextstrain.org/en/latest/guides/bioinformatics/seq_traits.html + +- type: page + from_url: /faq/translate_ref.html + to_url: https://docs.nextstrain.org/en/latest/guides/bioinformatics/translate_ref.html + +- type: page + from_url: /faq/vcf_input.html + to_url: https://docs.nextstrain.org/en/latest/guides/bioinformatics/vcf_input.html + +- type: page + from_url: /tutorials/tb_tutorial.html + to_url: https://docs.nextstrain.org/en/latest/tutorials/tb_tutorial.html + +- type: page + from_url: /tutorials/tutorials.html + to_url: https://docs.nextstrain.org/en/latest/tutorials/index.html + +- type: page + from_url: /tutorials/zika_tutorial.html + to_url: https://docs.nextstrain.org/en/latest/tutorials/zika_tutorial.html + +- type: page + from_url: /usage/augur_snakemake.html + to_url: https://docs.nextstrain.org/en/latest/guides/bioinformatics/augur_snakemake.html