Skip to content

reintroduce sphinx github style #9

reintroduce sphinx github style

reintroduce sphinx github style #9

Workflow file for this run

name: 'Run tests for ci cd'
on:
push:
branches: [ main, sphinx-multiversioning ]
tags:
- "*"
env:
POETRY_VERSION: 1.3.1
jobs:
publish_docs:
name: Build the docs using Sphinx and push to gh-pages
runs-on: ubuntu-latest
env:
python-version: 3.9
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: setup python ${{ env.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.python-version }}
cache: 'poetry'
- name: Fetch git tags
run: git fetch --tags origin
- name: Install Dependencies
run: poetry install
- name: Build docs
run: |
poetry run sphinx-multiversion docs doc_build/
- name: Add redirect to stable doc
run: |
cp assets/redirect.html doc_build/index.html
cp assets/README.md doc_build/README.md
sed -i "s/\[VERSION\]/$(poetry version -s)/g" doc_build/index.html
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./doc_build