summaryrefslogtreecommitdiff
path: root/.github/workflows/update-rtd-redirects.yml
blob: 8259b6c0b6ad6bfe0d0b825c84008f714eaabaa6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
name: Update documentation redirects

on:
  push:
    branches: [main]
  schedule:
    - cron: 0 0 * * MON # Run every Monday at 00:00 UTC

env:
  FORCE_COLOR: "1"

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
  cancel-in-progress: true

jobs:
  update-rtd-redirects:
    runs-on: ubuntu-latest
    environment: RTD Deploys
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-python@v4
        with:
          python-version: "3.11"
      - run: pip install httpx pyyaml rich
      - run: python tools/update-rtd-redirects.py
        env:
          RTD_API_TOKEN: ${{ secrets.RTD_API_TOKEN }}