several more static analyses and dependency version updates #218
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: make build | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- uses: actions/checkout@v3 | |
# set up python | |
- name: set up python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# execute the actual make build process | |
- name: execute the make build | |
run: make | |
# remove mopitpy | |
- name: purge local bookbuilderpy installation | |
run: | | |
pip uninstall -y bookbuilderpy | |
# attempt to install it again from github | |
- name: install bookbuilderpy from github | |
run: | | |
pip install git+https://github.com/thomasWeise/bookbuilderpy.git | |
python -c "import bookbuilderpy" | |
# fix urls in documentation | |
- name: fix documentation urls | |
run: | | |
find /home/runner/work/bookbuilderpy/bookbuilderpy/docs/build/ \( -type d -name .git -prune \) -o -type f -name "*.html" -print0 | xargs -0 sed -i 's/ href=\"_static\// href=\"\/bookbuilderpy\/_static\//g' | |
find /home/runner/work/bookbuilderpy/bookbuilderpy/docs/build/ \( -type d -name .git -prune \) -o -type f -name "*.html" -print0 | xargs -0 sed -i 's/ src=\"_static\// src=\"\/bookbuilderpy\/_static\//g' | |
touch /home/runner/work/bookbuilderpy/bookbuilderpy/docs/build/.nojekyll | |
# deploy to github pages | |
- name: deploy documentation | |
uses: JamesIves/github-pages-deploy-action@a1ea191d508feb8485aceba848389d49f80ca2dc | |
with: | |
branch: gh-pages | |
folder: /home/runner/work/bookbuilderpy/bookbuilderpy/docs/build/ | |
single-commit: true | |
# publish to pypi _only_ on release: | |
- name: publish to pypi | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
run: | | |
python3 -m twine upload dist/*.tar.gz dist/*.whl | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.TWINE_TOKEN }} |