JOSS: Fix affiliation for Lei Zhang #282
Workflow file for this run
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 publish documentation | |
on: | |
push: | |
branches: [ master ] | |
tags: | |
- '*' | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: install_python | |
run: | | |
sudo apt-get update -qy | |
sudo apt-get install -y python3-dev python3-pip libxml2-dev libxslt-dev zlib1g-dev libegl1 libopengl-dev | |
# Upgrade to latest meson and ninja | |
sudo pip install --upgrade meson ninja | |
# needs fenics to build fenics integration documentation snippet | |
- name: install_fenics | |
run: | | |
sudo apt-get install -y --no-install-recommends software-properties-common | |
sudo add-apt-repository -y ppa:fenics-packages/fenics | |
sudo apt-get update -qy | |
sudo apt-get install -y fenics python3-dolfin python3-mshr | |
- name: install_package | |
run: | | |
sudo pip install .[docs] | |
# Standard drop-in approach that should work for most people. | |
- name: build_doc | |
run: | | |
cd docs | |
make html SPHINXOPTS="-j auto" | |
cd .. | |
# Publish built docs to gh-pages branch. | |
# =============================== | |
- name: Commit documentation changes | |
run: | | |
git clone https://github.com/libAtoms/matscipy.git --branch gh-pages --single-branch gh-pages | |
cp -r docs/_build/html/* gh-pages/ | |
cd gh-pages | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add . | |
git commit -m "Update documentation" -a || true | |
# The above command will fail if no changes were present, so we ignore | |
# that. | |
- name: Push changes | |
if: github.ref == 'refs/heads/master' | |
uses: ad-m/github-push-action@master | |
with: | |
branch: gh-pages | |
directory: gh-pages | |
github_token: ${{ secrets.GITHUB_TOKEN }} |