Skip to content

Minor documentation improvements (#885) #188

Minor documentation improvements (#885)

Minor documentation improvements (#885) #188

Workflow file for this run

name: docs
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --dev --all-extras
- name: Building docs
run: cd doc && uv run make html && cd ..
# Great extra actions to compose with:
# Publish built docs to gh-pages branch.
# ===============================
- name: Commit documentation changes
run: |
git clone https://github.com/coin-or/pulp.git --branch gh-pages --single-branch gh-pages
rm -rf gh-pages/*
cp -r doc/build/html/* gh-pages/
cd gh-pages
touch .nojekyll
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
# that.
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: gh-pages
github_token: ${{ secrets.GH_TOKEN }}
# ===============================