Update build.yml #74
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: Build and Deploy | |
on: | |
push: | |
branches: | |
- master | |
permissions: | |
contents: write | |
id-token: write | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup conda | |
uses: s-weigand/setup-conda@v1 | |
with: | |
activate-conda: true | |
conda-channels: anaconda | |
- name: Install required dependencies | |
run: | | |
conda install -c conda-forge graph-tool | |
pip install Sphinx | |
pip install clingo | |
python3 setup.py install | |
pip install sphinx-copybutton | |
pip install furo | |
pip install wheel | |
pip install twine | |
- name: Build HTML files | |
run: | | |
cd sphinx-build | |
python3 run.py | |
pip install mpmath==1.3.0 | |
make clean html | |
- name: Deploy 🚀 | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: sphinx-build/_build/html | |
target-folder: docs | |
- name: Build Pypi Files | |
run: | | |
rm -rf build dist gunfolds.egg-info | |
git stash | |
git fetch --all | |
git checkout version | |
bash version_update.sh | |
python3 setup.py sdist bdist_wheel | |
- name: Publish to Pypi | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.PYPI_API }} |