Skip to content

update to the new pycommons version and added optional H-table loggin… #870

update to the new pycommons version and added optional H-table loggin…

update to the new pycommons version and added optional H-table loggin… #870

Workflow file for this run

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 moptipy
- name: purge local moptipy installation
run: |
pip uninstall -y moptipy
# attempt to install it again from github
- name: install moptipy from github
run: |
pip install git+https://github.com/thomasWeise/moptipy.git
python -c "import moptipy"
# fix urls in documentation
- name: fix documentation urls
run: |
find /home/runner/work/moptipy/moptipy/docs/build/ \( -type d -name .git -prune \) -o -type f -name "*.html" -print0 | xargs -0 sed -i 's/ href=\"_static\// href=\"\/moptipy\/_static\//g'
find /home/runner/work/moptipy/moptipy/docs/build/ \( -type d -name .git -prune \) -o -type f -name "*.html" -print0 | xargs -0 sed -i 's/ src=\"_static\// src=\"\/moptipy\/_static\//g'
touch /home/runner/work/moptipy/moptipy/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/moptipy/moptipy/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 }}