move to new moptipy and pycommons version #16
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: main build | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build_python_3_12: | |
runs-on: ubuntu-latest | |
steps: | |
# check out the github repository | |
- uses: actions/[email protected] | |
# set up python | |
- name: set up python "3.12" | |
uses: actions/[email protected] | |
with: | |
python-version: "3.12" | |
# clean-up | |
- name: clean up | |
run: | | |
rm -rf /home/runner/work/moptipyapps/moptipyapps/docs/build/ | |
rm -rf /home/runner/work/moptipyapps/moptipyapps/dist | |
rm -rf /home/runner/work/moptipyapps/moptipyapps/build | |
# execute the actual make build process | |
- name: execute the make build | |
run: ./make.sh | |
# remove moptipyapps | |
- name: purge local moptipyapps installation | |
run: | | |
pip uninstall -y moptipyapps | |
# attempt to install it again from github | |
- name: install moptipyapps from github | |
run: | | |
pip install git+https://github.com/thomasWeise/moptipyapps.git | |
python -c "import moptipyapps" | |
# fix urls in documentation | |
- name: fix documentation urls | |
run: | | |
find /home/runner/work/moptipyapps/moptipyapps/docs/build/ \( -type d -name .git -prune \) -o -type f -name "*.html" -print0 | xargs -0 sed -i 's/ href=\"_static\// href=\"\/moptipyapps\/_static\//g' | |
find /home/runner/work/moptipyapps/moptipyapps/docs/build/ \( -type d -name .git -prune \) -o -type f -name "*.html" -print0 | xargs -0 sed -i 's/ src=\"_static\// src=\"\/moptipyapps\/_static\//g' | |
touch /home/runner/work/moptipyapps/moptipyapps/docs/build/.nojekyll | |
# deploy to github pages | |
- name: deploy documentation | |
uses: JamesIves/github-pages-deploy-action@65b5dfd4f5bcd3a7403bbc2959c144256167464e | |
with: | |
branch: gh-pages | |
folder: /home/runner/work/moptipyapps/moptipyapps/docs/build/ | |
single-commit: true |