docs: logo banner #73
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: Deploy Documentation | |
| on: | |
| push: | |
| branches: | |
| - main | |
| # Optional: manual trigger | |
| workflow_dispatch: | |
| jobs: | |
| deploy-docs: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Micromamba | |
| uses: mamba-org/setup-micromamba@v2 | |
| with: | |
| environment-file: environment.yml | |
| init-shell: bash | |
| condarc: | | |
| channels: | |
| - conda-forge | |
| channel_priority: strict | |
| cache-environment: true | |
| - name: Install package (editable) | |
| shell: bash -l {0} | |
| run: | | |
| micromamba run -n seasenselib python -m pip install --upgrade pip | |
| micromamba run -n seasenselib python -m pip install -e . --no-deps --force-reinstall | |
| - name: Build documentation | |
| shell: bash -l {0} | |
| run: | | |
| set -e | |
| micromamba run -n seasenselib jupyter nbconvert --to notebook --execute notebooks/demo.ipynb --output=demo-output.ipynb --ExecutePreprocessor.allow_errors=False | |
| micromamba run -n seasenselib jupyter nbconvert --to notebook --execute notebooks/demo_mooring.ipynb --output=demo_mooring-output.ipynb --ExecutePreprocessor.allow_errors=False | |
| mv notebooks/*output.ipynb docs/source/ | |
| pushd docs | |
| micromamba run -n seasenselib make clean html | |
| popd | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: docs/build/html |