Chore release 8.8.0 into release #19507
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
| # This workflow builds API docs when either: | |
| # | |
| # * A commit is tagged like "docs@foo" or "staging-docs@foo". | |
| # | |
| # * Someone pushes to either: | |
| # * The `edge` branch, or | |
| # * Any branch starting with "chore_release". | |
| # | |
| # * A pull request touches any of: | |
| # * The api/** | |
| # * The tooling used to build the docs. | |
| # | |
| # * Or when manually dispatched from the Actions tab. | |
| name: 'API docs build' | |
| on: | |
| push: | |
| branches: | |
| - edge | |
| - 'chore_release*' | |
| tags: | |
| - 'docs@*' | |
| - 'staging-docs@*' | |
| pull_request: | |
| paths: | |
| - 'api/**' | |
| - '.github/workflows/docs-build.yaml' | |
| - '.github/actions/python/**' | |
| - '.github/workflows/utils.js' | |
| - 'scripts/static-deploy/**' | |
| workflow_dispatch: {} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.ref_name != 'edge' || github.run_id}}-${{ github.ref_type != 'tag' || github.run_id }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash | |
| env: | |
| CI: 'true' | |
| # This is the artifact directory as a relative path | |
| # to the working-directory of our tools: scripts/static-deploy | |
| # our script deploy_ci_config.py expects this ENV variable is set | |
| RELATIVE_ARTIFACT_DIR: '../../dist' | |
| jobs: | |
| determine-deploy-config: | |
| name: Determine Deployment Configuration | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| application: ${{ steps.deploy-config.outputs.APPLICATION }} | |
| environment: ${{ steps.deploy-config.outputs.ENVIRONMENT }} | |
| sandbox_prefix: ${{ steps.deploy-config.outputs.SANDBOX_PREFIX }} | |
| relative_artifact_dir: ${{ steps.deploy-config.outputs.RELATIVE_ARTIFACT_DIR }} | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - uses: ./.github/actions/git/resolve-tag | |
| - name: Setup UV | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| python-version: '3.10' | |
| - name: Setup Deploy Dependencies | |
| working-directory: scripts/static-deploy | |
| run: make setup | |
| - name: Determine Deployment Configuration | |
| id: deploy-config | |
| working-directory: scripts/static-deploy | |
| run: make resolve-ci | |
| build: | |
| name: opentrons documentation build | |
| runs-on: 'ubuntu-24.04' | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: 'actions/checkout@v4' | |
| with: | |
| fetch-depth: 0 | |
| - uses: ./.github/actions/git/resolve-tag | |
| - uses: ./.github/actions/environment/complex-variables | |
| - uses: 'actions/setup-node@v4' | |
| with: | |
| node-version: '22.12.0' | |
| - uses: 'actions/setup-python@v3' | |
| with: | |
| python-version: '3.10' | |
| - uses: './.github/actions/python/setup' | |
| with: | |
| project: 'api' | |
| - name: 'Build docs' | |
| run: | | |
| make -C api docs | |
| - name: 'upload github artifact' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: 'docs-artifact' | |
| path: api/docs/dist/ | |
| deploy: | |
| name: Deploy docs to S3 | |
| needs: | |
| - determine-deploy-config | |
| - build | |
| runs-on: 'ubuntu-24.04' | |
| timeout-minutes: 5 | |
| if: always() && needs.build.result == 'success' && needs.determine-deploy-config.result == 'success' | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: ./.github/actions/git/resolve-tag | |
| - name: Setup UV | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| python-version: '3.10' | |
| - name: Setup Deploy Dependencies | |
| working-directory: scripts/static-deploy | |
| run: | | |
| make setup | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| aws-region: us-east-2 | |
| audience: sts.amazonaws.com | |
| role-to-assume: ${{ secrets.STATIC_DEPLOYMENT_ROLE }} | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: docs-artifact | |
| path: ./dist # in the default workspace | |
| # RELATIVE_ARTIFACT_DIR is set to ../../dist | |
| # because that is the relative path from scripts/static-deploy | |
| # to the this location | |
| - name: Deploy to S3 | |
| working-directory: scripts/static-deploy | |
| run: make deploy \ | |
| APPLICATION=${{ needs.determine-deploy-config.outputs.application }} \ | |
| ENVIRONMENT=${{ needs.determine-deploy-config.outputs.environment }} \ | |
| SANDBOX_PREFIX=${{ needs.determine-deploy-config.outputs.sandbox_prefix }} \ | |
| RELATIVE_ARTIFACT_DIR=${{ needs.determine-deploy-config.outputs.relative_artifact_dir }} |