Skip to content

Bump to 1.5.0

Bump to 1.5.0 #609

Workflow file for this run

name: Document
on: [push, pull_request]
jobs:
Document:
runs-on:
ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached Poetry virtualenv
uses: actions/cache@v3
id: cached-poetry-dependencies
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Install Dependencies
run: |
poetry install -E full
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- name: Produce documentation
env:
ADS_API: ${{ secrets.ADS_API }}
run: |
sudo apt-get update
sudo apt-get install -y pandoc
cd docs/
poetry run make html
cd ..
- name: Commit documentation changes
if: github.event_name != 'pull_request'
run: |
git clone https://github.com/sbozzolo/kuibit.git --branch gh-pages --single-branch gh-pages
mkdir -p gh-pages/dev
[[ $(git branch --show-current) == 'next' ]] && cp -r docs/_build/html/* gh-pages/dev/ || cp -r docs/_build/html/* gh-pages/
cd gh-pages
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update documentation" -a || true
# The above command will fail if no changes were present, so we ignore
# the return code.
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: gh-pages
# force: true
directory: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}