⬆ Bump actions/setup-python from 5 to 6 (#593) #120
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: | |
| # - "develop/**" # For testing | |
| - "master" | |
| paths: | |
| # Documentation | |
| # Doc - CI workflow | |
| - ".github/workflows/documentation.yaml" | |
| - "scripts/ci/**documentation**.sh" | |
| # Doc - Content | |
| - "docs/**/*.md" | |
| # Doc - MkDoc config | |
| - "mkdocs.yml" | |
| # Python source code package info | |
| - "**/__pkg_info__.py" | |
| env: | |
| RELEASE_TYPE: python-package | |
| PYTHON_PACKAGE_NAME: fake_api_server | |
| SOFTWARE_VERSION_FORMAT: general-3 | |
| RUNNING_MODE: dry-run | |
| permissions: | |
| contents: write | |
| id-token: write | |
| pages: write | |
| jobs: | |
| deploy_latest_documentation: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Python 3.13 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - name: Install Python dependencies about Poetry | |
| run: | | |
| python3 -m pip install --upgrade pip | |
| pip3 install -U pip | |
| pip install -U poetry | |
| - name: Build Python runtime environment and dependencies by Poetry | |
| run: | | |
| poetry --version | |
| poetry install --with docs | |
| # build and commit documentation with versioning | |
| - name: Build versioning documentation | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| run: | | |
| echo "Documentation tool version info:" | |
| poetry run mkdocs --version | |
| poetry run mike --version | |
| bash ./scripts/ci/deploy-latest-version-documentation.sh | |
| check_version-state: | |
| # name: Check the version update state | |
| uses: Chisanan232/GitHub-Action_Reusable_Workflows-Python/.github/workflows/rw_checking_deployment_state.yaml@v7.3 | |
| with: | |
| library-name: fake-api-server | |
| library-source-code-path: ./fake_api_server | |
| check_version_info: | |
| # name: Check the package version info to make sure whether it should release Docker image or not. | |
| needs: check_version-state | |
| if: ${{ needs.check_version-state.outputs.version_update_state == 'VERSION UPDATE' }} | |
| uses: Chisanan232/GitHub-Action_Reusable_Workflows-Python/.github/workflows/rw_build_git-tag_and_create_github-release.yaml@v7.3 | |
| secrets: | |
| github_auth_token: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| project_type: python-package | |
| project_name: fake_api_server | |
| software_version_format: general-3 | |
| debug_mode: true | |
| deploy_stable_documentation: | |
| needs: check_version_info | |
| if: ${{ needs.check_version_info.outputs.python_release_version == 'Official-Release' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Python 3.12 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install Python dependencies about Poetry | |
| run: | | |
| python3 -m pip install --upgrade pip | |
| pip3 install -U pip | |
| pip install -U poetry | |
| - name: Build Python runtime environment and dependencies by Poetry | |
| run: | | |
| poetry --version | |
| poetry install --with docs | |
| # build and commit documentation with versioning | |
| - name: Build versioning documentation | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| run: | | |
| echo "Documentation tool version info:" | |
| poetry run mkdocs --version | |
| poetry run mike --version | |
| bash ./scripts/ci/deploy-stable-version-documentation.sh \ | |
| -r '${{ env.RELEASE_TYPE }}' \ | |
| -p '${{ env.PYTHON_PACKAGE_NAME }}' \ | |
| -v '${{ env.SOFTWARE_VERSION_FORMAT }}' \ | |
| # -d '${{ env.RUNNING_MODE }}' | |
| # # general build and deploy documentation to GitHub Page | |
| # - name: Deploy documentation | |
| # env: | |
| # GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| # run: | | |
| # poetry run mkdocs gh-deploy --clean --force --ignore-version | |
| # poetry run mkdocs --version |