Bump matplotlib from 3.7.2 to 3.9.0 in /requirements #578
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: docs | |
on: | |
pull_request: | |
push: | |
branches: [ main ] | |
tags: | |
- '*' | |
jobs: | |
build-docs: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Fetch the history for all tags and branches | |
# so that the correct version string can be constructed | |
# by setuptools_scm. | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: install dependencies | |
run: | | |
python -m pip install \ | |
-r requirements/minimal.txt \ | |
-r requirements/docs.txt \ | |
build \ | |
packaging | |
- name: generate version string | |
run: python -m build --sdist | |
- name: build Docs | |
run: make -C docs | |
- name: move docs | |
if: github.event_name == 'push' | |
run: | | |
cp docs/is_new_stable.py /tmp/ | |
mv docs/_build/html /tmp/${GITHUB_REF_NAME} | |
git checkout gh-pages | |
rm -fr ${GITHUB_REF_NAME} | |
mv /tmp/${GITHUB_REF_NAME} . | |
find ${GITHUB_REF_NAME} -name __pycache__ -exec rm -r {} + | |
rm -fr latest | |
ln -s ${GITHUB_REF_NAME} latest | |
- name: check if tag is new stable | |
if: github.event_name == 'push' && github.ref_type == 'tag' | |
run: | | |
if [ -f stable ]; then | |
export STABLE=$(readlink stable) | |
else | |
export STABLE=0 | |
fi | |
if python /tmp/is_new_stable.py ${STABLE} ${GITHUB_REF_NAME}; then | |
# Use for "stable" docs path. | |
echo "new stable is ${GITHUB_REF_NAME}" | |
rm -fr stable | |
ln -s ${GITHUB_REF_NAME} stable | |
echo "STABLE_PATH=stable" >> $GITHUB_ENV | |
fi | |
- name: commit to gh-pages | |
if: github.event_name == 'push' | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: deploy ${{ github.ref }} | |
branch: gh-pages | |
file_pattern: ${{ github.ref_name }} latest ${{ env.STABLE_PATH }} |