asic doc ++ #62
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Build on main and dev only" | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
with: | |
fetch-depth: 0 | |
- name: "setup python" | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: "install dependencies" | |
run: | | |
apt-get update -y && apt-get install -y git | |
pip install -r requirements.txt | |
- name: "check links" | |
run: make linkcheck | |
- name: "Build multiversioned doc" | |
run: sphinx-multiversion source docs/html | |
- name: "add .nojekill and redirect to main" | |
run: | | |
sudo touch docs/html/.nojekyll | |
sudo tee docs/html/index.html << EOF | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Redirecting to main branch</title> | |
<meta charset="utf-8"> | |
<meta http-equiv="refresh" content="0; url=./main/index.html"> | |
<link rel="canonical" href="https://spinalhdl.github.io/NaxRiscv-Rtd/main/index.html"> | |
</head> | |
</html> | |
EOF | |
- name: Deploy to Pages | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: docs/html |