docs: redirect from index to dev
This commit is contained in:
parent
f510f0067b
commit
dbd20fa0cd
3 changed files with 13 additions and 1 deletions
4
.github/workflows/ci.yaml
vendored
4
.github/workflows/ci.yaml
vendored
|
|
@ -101,7 +101,9 @@ jobs:
|
||||||
- name: Build Python package
|
- name: Build Python package
|
||||||
run: maturin develop --release --manifest-path pyargus/Cargo.toml
|
run: maturin develop --release --manifest-path pyargus/Cargo.toml
|
||||||
- name: Build HTML docs
|
- name: Build HTML docs
|
||||||
run: sphinx-multiversion docs _site -b html
|
run: |
|
||||||
|
sphinx-multiversion docs _site -b html
|
||||||
|
cp ./docs/_templates/index-redirect.html _site/index.html
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
if: github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/')
|
if: github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/')
|
||||||
|
|
|
||||||
9
docs/_templates/index-redirect.html
vendored
Normal file
9
docs/_templates/index-redirect.html
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Redirecting to master branch</title>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="refresh" content="0; url=./master/index.html">
|
||||||
|
<link rel="canonical" href="/dev/index.html">
|
||||||
|
</head>
|
||||||
|
</html>
|
||||||
|
|
@ -49,6 +49,7 @@ def docs(session: nox.Session):
|
||||||
with session.chdir(CURRENT_DIR / "pyargus"):
|
with session.chdir(CURRENT_DIR / "pyargus"):
|
||||||
session.install("-e", ".")
|
session.install("-e", ".")
|
||||||
session.run("sphinx-multiversion", "docs", "_site", "-b", "html")
|
session.run("sphinx-multiversion", "docs", "_site", "-b", "html")
|
||||||
|
session.run("cp", "./docs/_templates/index-redirect.html", "_site/index.html")
|
||||||
|
|
||||||
|
|
||||||
@nox.session(tags=["style", "fix", "rust"], python=False)
|
@nox.session(tags=["style", "fix", "rust"], python=False)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue