Skip to content

bump: version 2.4.1 → 2.4.2 #108

bump: version 2.4.1 → 2.4.2

bump: version 2.4.1 → 2.4.2 #108

Workflow file for this run

name: ci-docs
on:
push:
branches:
- master
jobs:
Docs:
strategy:
fail-fast: false
matrix:
python-version: ["3.12"]
os: [ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0
- name: Set up Python
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/[email protected]
with:
poetry-version: 1.6.1
- name: Cache Poetry virtualenv
uses: actions/cache@v3
id: cache
with:
path: ~/.virtualenvs
key: venv--${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
venv--${{ matrix.os }}-${{ matrix.python-version }}-
- name: Set Poetry config
run: |
poetry config virtualenvs.in-project false
poetry config virtualenvs.path ~/.virtualenvs
- name: Install Dependencies
run: poetry install -E server
- name: Build sphinx documentation
run: |
cd docs
poetry run python -m sphinx . build -b html -c .
- name: Commit documentation changes
run: |
git clone https://github.com/Deltares/GEOLib.git --branch gh-pages --single-branch gh-pages
rm -r -f gh-pages/dev
mkdir gh-pages/dev
cp -r docs/build/* gh-pages/dev
cd gh-pages
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update dev version 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
directory: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}