File tree Expand file tree Collapse file tree 4 files changed +60
-0
lines changed Expand file tree Collapse file tree 4 files changed +60
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ # Sync RTD redirects
3
+ name : redirects
4
+
5
+ on :
6
+ push :
7
+ branches :
8
+ - main
9
+ paths :
10
+ - docs/redirects.yml
11
+ - .github/workflows/redirects.yml
12
+
13
+ # Manually triggered using GitHub's UI
14
+ workflow_dispatch :
15
+
16
+ jobs :
17
+ docs :
18
+ environment : release
19
+ runs-on : ubuntu-latest
20
+ steps :
21
+ - uses : actions/checkout@v2
22
+ - uses : actions/setup-python@v4
23
+
24
+ - name : Upgrade Python toolchain
25
+ run : python3 -m pip install --upgrade pip setuptools wheel
26
+
27
+ - name : Install readthedocs-cli
28
+ run : python3 -m pip install readthedocs-cli
29
+
30
+ - name : Sync redirects
31
+ run : rtd projects ansible-lint redirects sync -f docs/redirects.yml --wet-run
32
+ env :
33
+ RTD_TOKEN : ${{ secrets.RTD_TOKEN }}
Original file line number Diff line number Diff line change 178
178
html_theme_options = {
179
179
"collapse_navigation" : False ,
180
180
"analytics_id" : "UA-128382387-1" ,
181
+ # cspell:disable-next-line
182
+ "tag_manager_id" : "GTM-5FGNF6S" ,
181
183
"style_nav_header_background" : "#5bbdbf" ,
182
184
"style_external_links" : True ,
183
185
# 'canonical_url': "https://docs.ansible.com/ansible/latest/",
Original file line number Diff line number Diff line change
1
+ # Authoritative list of redirects we have configured in RTD,
2
+ # https://pypi.org/project/readthedocs-cli/
3
+ ---
4
+ - type : page
5
+ from_url : /rules/git-latest/
6
+ to_url : /rules/latest/
7
+ - type : page
8
+ from_url : /rules/hg-latest/
9
+ to_url : /rules/latest/
10
+ - type : page
11
+ from_url : /default_rules/index/
12
+ to_url : /rules/
13
+ # Keep this last or it will match all the other rules
14
+ - type : sphinx_htmldir
15
+ from_url : " "
16
+ to_url : " "
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ passenv =
44
44
PYTEST_* # allows developer to define their own preferences
45
45
PYTEST_REQPASS # needed for CI
46
46
PY_COLORS
47
+ RTD_TOKEN
47
48
REQUESTS_CA_BUNDLE # https proxies
48
49
SSL_CERT_FILE # https proxies
49
50
LANG
@@ -161,6 +162,14 @@ commands =
161
162
' print("\n " + "=" * 120 + f"\n\n Documentation available under `file://\{ index_file\} `\n\n To serve docs, use `python3 -m http.server --directory \{ docs_dir\} 0`\n\n " + "=" * 120)'
162
163
changedir = {toxinidir}/docs
163
164
165
+ [testenv:redirects]
166
+ description = Update documentation redirections for readthedocs
167
+ deps =
168
+ readthedocs-cli
169
+ commands =
170
+ # This assumes you loaded RTD_TOKEN in your environment
171
+ rtd projects ansible-lint redirects sync -f docs/redirects.yml --wet-run
172
+
164
173
[testenv:eco]
165
174
description = Perform ecosystem impact (downstream testing) https://github.com/ansible-community/ansible-lint/discussions/1403
166
175
skip_install = true
You can’t perform that action at this time.
0 commit comments