Docs #13
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: Docs | |
| on: | |
| workflow_call: | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-and-deploy: | |
| concurrency: ci-${{ github.ref }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Fail if branch is not main | |
| run: | | |
| if [[ "${{ github.ref }}" != "refs/heads/main" ]]; then | |
| echo "This workflow can only be run on the main branch." | |
| exit 1 | |
| fi | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Setup python and poetry | |
| uses: ./.github/actions/python-poetry | |
| with: | |
| groups: "docs" | |
| - name: Generate notebook examples | |
| run: | | |
| poetry run jupyter nbconvert --to markdown --allow-errors --output-dir docs/examples notebooks/*.ipynb | |
| - name: Deploy docs | |
| run: | | |
| poetry run mkdocs gh-deploy --force |