build(deps): bump urllib3 from 2.6.1 to 2.6.2 #187
Workflow file for this run
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
| # If triggered automatically => build and publish with dev tag | |
| # If triggered manually => build and publish supplied version | |
| name: Build documentation | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths-ignore: ["Dockerfile", "start.sh"] | |
| pull_request: | |
| branches: [ main ] | |
| paths-ignore: ["Dockerfile", "start.sh"] | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'The version tag for the documentation. Should follow latest released version.' | |
| required: true | |
| type: string | |
| jobs: | |
| build-documentation: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| # for publishing changes | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| if: github.event_name != 'pull_request' | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: gh-pages | |
| - name: Checkout main branch | |
| uses: actions/checkout@v6 | |
| - name: Fetch all tags | |
| run: git fetch --depth=1 --tags | |
| - name: Set version and documentation aliases | |
| id: set-doc-aliases | |
| if: github.event_name != 'workflow_dispatch' | |
| run: | | |
| echo "UVMS_MKDOCS_IMAGE_VERSION=$(git tag -l --sort=-taggerdate 'docker-image-*' | head -n1 | sed 's/docker-image-//' 2>&1)" >> $GITHUB_ENV | |
| echo "UVMS_FULL_VERSION=$(./getVersion.sh)" >> $GITHUB_ENV | |
| echo "UVMS_VERSION_AND_ALIASES=dev" >> $GITHUB_ENV | |
| - name: Set manual version and documentation aliases | |
| id: set-manul-doc-aliases | |
| if: github.event_name == 'workflow_dispatch' | |
| run: | | |
| export FULL_VERSION=${{ inputs.version }} | |
| export VERSION_WITHOUT_PATCH_PART=$(echo "$FULL_VERSION" | grep -Po '(\d+\.\d+)' | head -n1) | |
| echo "UVMS_MKDOCS_IMAGE_VERSION=$(git tag -l --sort=-taggerdate 'docker-image-*' | head -n1 | sed 's/docker-image-//' 2>&1)" >> $GITHUB_ENV | |
| echo "UVMS_GIT_TAG=$(./getNextVersion.sh uvms $FULL_VERSION)" >> $GITHUB_ENV | |
| echo "UVMS_FULL_VERSION=$FULL_VERSION" >> $GITHUB_ENV | |
| echo "UVMS_VERSION_AND_ALIASES=$VERSION_WITHOUT_PATCH_PART latest" >> $GITHUB_ENV | |
| - name: Update versions | |
| id: update-version | |
| if: github.event_name != 'pull_request' | |
| env: | |
| FULL_VERSION: ${{ env.UVMS_FULL_VERSION }} | |
| run: | | |
| ./updateVersion.sh uvms_version ${FULL_VERSION} mkdocs.yml | |
| git config user.name uvmsci | |
| git config user.email uvmsci@gmail.com | |
| git add mkdocs.yml | |
| [ -n "$(git status --porcelain)" ] && \ | |
| git commit -am "docs: updates to version ${FULL_VERSION} in mkdocs.yml" || \ | |
| echo "Building the same version again" | |
| - name: Build documentation | |
| id: build-with-mkdocs | |
| if: github.event_name == 'pull_request' | |
| uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3 | |
| with: | |
| registry: docker.io | |
| image: uvms/mkdocs-material:${{ env.UVMS_MKDOCS_IMAGE_VERSION }} | |
| options: -v ${{ github.workspace }}:/docs -w /docs | |
| run: | | |
| mkdocs build | |
| - name: Build documentation | |
| id: build-with-mike | |
| if: github.event_name != 'pull_request' | |
| uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3 | |
| with: | |
| registry: docker.io | |
| image: uvms/mkdocs-material:${{ env.UVMS_MKDOCS_IMAGE_VERSION }} | |
| options: -v ${{ github.workspace }}:/docs -w /docs | |
| run: | | |
| mike deploy -u ${{ env.UVMS_VERSION_AND_ALIASES }} | |
| chown -R 1001:118 .git | |
| - name: Tag release | |
| id: tag-release | |
| if: github.event_name == 'workflow_dispatch' | |
| env: | |
| TAG: ${{ env.UVMS_GIT_TAG }} | |
| run: | | |
| git tag -f -a "${TAG}" -m "docs: release ${TAG} of documentation" | |
| git push origin ${TAG} | |
| - name: Publish documentation | |
| id: publish-documentation | |
| if: github.event_name != 'pull_request' | |
| run: | | |
| git push origin HEAD | |
| git checkout gh-pages | |
| git push origin HEAD | |