Skip to content

Commit 8328135

Browse files
committed
Add GitHub action for RTD redirect updates
This makes it possible for pip's documentation's redirects to be automatically synchronised with the `main` branch.
1 parent fea8ae9 commit 8328135

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Update documentation redirects
2+
3+
on:
4+
push:
5+
branches: [main]
6+
schedule:
7+
- cron: 0 0 * * MON # Run every Monday at 00:00 UTC
8+
9+
env:
10+
FORCE_COLOR: "1"
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
update-rtd-redirects:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v3
21+
- uses: actions/setup-python@v4
22+
with:
23+
python-version: "3.11"
24+
- run: pip install httpx requests pyyaml
25+
- run: python tools/update-rtd-redirects.py
26+
env:
27+
RTD_API_TOKEN: ${{ secrets.RTD_API_TOKEN }}

0 commit comments

Comments
 (0)