Merge pull request #167 from bioio-devs/bugfix/docs-changelog #126
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 | |
| # This will generate the docs on every push to main for logging and tracking purposes | |
| # But it will only publish the generated docs on a new tag push | |
| # We may want to move to mkdocs gh-deploy | |
| # Following: https://github.com/tlambert03/nd2/blob/main/.github/workflows/docs.yml | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "v*" | |
| jobs: | |
| docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 # Full history needed for tags and changelog | |
| ref: ${{ github.ref }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.11" | |
| - uses: extractions/setup-just@v3 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install .[docs] | |
| - name: Generate Docs | |
| run: | | |
| just generate-docs | |
| touch docs/_build/.nojekyll | |
| - name: Publish Docs | |
| # Only publish docs on tag push | |
| if: ${{ success() && startsWith(github.ref, 'refs/tags/') }} | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| folder: docs/_build/ |