Skip to content

feat(protocol-visualization): port SlotDetailsEmptyState (#21249) #3710

feat(protocol-visualization): port SlotDetailsEmptyState (#21249)

feat(protocol-visualization): port SlotDetailsEmptyState (#21249) #3710

name: 'Docs build and deploy'
on:
pull_request:
paths:
- 'api/**'
- 'docs/**'
- '.github/workflows/docs-build-deploy.yaml'
- 'scripts/static-deploy/**'
push:
branches:
- 'edge'
- 'chore_release*'
tags:
- 'staging-MKDOCS*'
- 'staging-mkdocs*'
- 'MKDOCS*'
- 'mkdocs*'
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:
build-docs:
timeout-minutes: 5
runs-on: ubuntu-24.04
permissions:
id-token: write
contents: read
env:
BRANCH: ${{ github.event.pull_request.head.ref != '' && github.event.pull_request.head.ref || github.ref_name }}
outputs:
artifacts-path: ${{ steps.upload-artifacts.outputs.path }}
steps:
- name: 'Checkout Repository'
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Setup UV
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
with:
python-version: '3.12'
enable-cache: true
cache-dependency-glob: './docs/uv.lock'
- name: Setup Docs Dependencies
working-directory: ./docs
run: make setup
- name: Build Docs
working-directory: ./docs
run: make build
- name: Upload Artifacts
id: upload-artifacts
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: docs-artifacts
path: |
docs/site/
retention-days: 1
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 }}
branch: ${{ steps.config.outputs.branch }}
bucket: ${{ steps.config.outputs.bucket }}
url: ${{ steps.config.outputs.url }}
steps:
- name: Checkout Repository
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- uses: ./.github/actions/git/resolve-tag
- name: Setup UV
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
with:
python-version: '3.12'
enable-cache: true
- 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
deploy-docs:
needs:
- build-docs
- determine-deploy-config
timeout-minutes: 5
runs-on: ubuntu-24.04
if: always() && needs.build-docs.result == 'success' && needs.determine-deploy-config.result == 'success' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
permissions:
id-token: write
contents: read
env:
ENVIRONMENT: ${{ needs.determine-deploy-config.outputs.ENVIRONMENT }}
BRANCH: ${{ needs.determine-deploy-config.outputs.branch }}
BUCKET: ${{ needs.determine-deploy-config.outputs.bucket }}
URL: ${{ needs.determine-deploy-config.outputs.url }}
steps:
- name: Checkout Repository
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- id: resolve-tag
uses: ./.github/actions/git/resolve-tag
- name: Setup UV
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
with:
python-version: '3.12'
enable-cache: true
- name: Setup Deploy Dependencies
working-directory: scripts/static-deploy
run: make setup
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4
with:
role-to-assume: ${{ vars.STATIC_DEPLOY_ROLE }}
aws-region: us-east-2
- name: Download Artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: docs-artifacts
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 }}
- name: Output Deployment URL
run: |
echo "## 🚀 Docs site deployed to ${{ env.ENVIRONMENT }}" >> $GITHUB_STEP_SUMMARY
echo "<${{ env.URL }}>" >> $GITHUB_STEP_SUMMARY