Merge pull request #426 from EIT-ALIVE/fix/doc-build #330
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: Documentation | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| branches: | |
| - main | |
| - develop | |
| jobs: | |
| build-docs: | |
| if: github.event.pull_request.draft == false | |
| name: Build documentation | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: ./.github/actions/install_eitprocessing | |
| with: | |
| dependencies: docs | |
| extract-data: false | |
| python-version: "3.10" | |
| - name: Build documentation | |
| run: | | |
| ln -s ../../notebooks docs/examples | |
| mkdocs build | |
| - name: Deploy documentation | |
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
| run: | | |
| GIT_COMMITTER_NAME=ci-bot GIT_COMMITTER_EMAIL=ci-bot@github.com \ | |
| mike deploy --push --update-aliases $(git describe --tags --abbrev=0 | sed -E 's/^([vV]?[0-9]+\.[0-9]+).*/\1/') latest |