Docs Build and Publish #117
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 Build and Publish | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "Version string" | |
| required: true | |
| type: string | |
| permissions: | |
| contents: write | |
| jobs: | |
| deploy-docs: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| # Conda requires a login shell in order to work properly | |
| shell: bash -l {0} | |
| env: | |
| DISPLAY: ":99.0" | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Qt headless display | |
| uses: pyvista/setup-headless-display-action@v4.3 | |
| with: | |
| qt: true | |
| - name: Set Up Miniforge | |
| uses: conda-incubator/setup-miniconda@v4.0.0 | |
| with: | |
| python-version: 3.11 | |
| miniforge-version: latest | |
| mamba-version: "*" | |
| channels: conda-forge | |
| environment-file: "environment-dev.yaml" | |
| activate-environment: "panseg-dev" | |
| conda-remove-defaults: true | |
| # Install MkDocs and deploy the documentation to GitHub Pages | |
| - name: Install MkDocs and Deploy | |
| shell: bash -l {0} | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| conda activate panseg-dev | |
| mike deploy --push --update-aliases ${{ inputs.version }} latest | |
| env: | |
| MKDOCS_GIT_COMMITTERS_APIKEY: ${{ secrets.MKDOCS_GIT_COMMITTERS_APIKEY }} |