Repository navigation
[pre-commit.ci] pre-commit autoupdate #336
Workflow file for this run
This file contains hidden or 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 docs | |
| # no permissions by default | |
| permissions: {} | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| release: | |
| types: | |
| - published | |
| jobs: | |
| build-docs: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Set up Python | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version: "3.x" | |
| - name: Install pandoc for notebook conversion | |
| run: > | |
| sudo apt-get update | |
| && sudo apt-get install pandoc | |
| - name: Install windrose | |
| run: | | |
| python -m pip install -e .[extras,tests,docs] | |
| - name: Build documentation | |
| run: | | |
| set -e | |
| jupyter nbconvert --to notebook --execute notebooks/usage.ipynb --output=usage-output.ipynb | |
| mv notebooks/*output.ipynb docs/ | |
| pushd docs | |
| make clean html linkcheck | |
| popd | |
| - name: Deploy | |
| if: success() && github.event_name == 'release' | |
| uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: docs/_build/html |