Merge pull request #18 from QuLogic/mpl39 #84
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: Docs | |
on: [push, pull_request] | |
env: | |
IS_RELEASE: | | |
${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Python dependencies | |
run: pip install -r requirements-doc.txt | |
- name: Install mpl-gui | |
run: python -m pip install -v . | |
- name: Build | |
run: | | |
if [ "x${IS_RELEASE}" == "xtrue" ]; then | |
O="-t release" | |
fi | |
make -Cdocs html O="$O" | |
- name: Publish | |
if: ${{ env.IS_RELEASE == 'true' }} | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs/build/html | |
force_orphan: true |