Merge pull request #146 from LedgerHQ/xch/stax-1.3.0 #813
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: Documentation generation & update | |
on: | |
push: | |
tags: | |
- '*' | |
branches: | |
- develop | |
- master | |
pull_request: | |
branches: | |
- develop | |
- master | |
jobs: | |
generate: | |
name: Generate the documentation | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install APT dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install graphviz | |
- name: Install Python dependencies | |
run: | | |
if [[ ${{ github.ref }} == "refs/tags/"* ]]; \ | |
then \ | |
pip install .[doc] | |
else \ | |
pip install --extra-index-url https://test.pypi.org/simple/ .[doc] | |
fi | |
- name: Generating automatic resources | |
run: (cd doc && make gen_resources) | |
- name: Generate the documentation | |
run: (cd doc && make html) | |
- name: Upload documentation bundle | |
uses: actions/upload-artifact@v3 | |
with: | |
name: documentation | |
path: doc/build/html/ | |
deploy: | |
name: Deploy the documentation on Github pages | |
runs-on: ubuntu-latest | |
needs: generate | |
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) | |
steps: | |
- name: Download documentation bundle | |
uses: actions/download-artifact@v3 | |
- name: Deploy documentation on pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: documentation/ |