[WIP] bounding box metadata docs (#696) #522
This file contains 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 | |
on: | |
workflow_dispatch: | |
inputs: | |
environment: | |
description: Deployment environment | |
type: choice | |
options: [ trunk, production ] | |
default: trunk | |
push: | |
branches: | |
- trunk | |
jobs: | |
docs: | |
name: Build and publish documentation | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-west-2 | |
- name: Configure SSH key for docs insiders setup | |
uses: webfactory/ssh-agent@v0.9.0 | |
with: | |
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
- uses: astral-sh/setup-uv@v2 | |
- name: Setup environment | |
run: uv venv && source .venv/bin/activate | |
- name: Fetch tags to enable autoversioning | |
run: git fetch --prune --unshallow --tags | |
- name: Install dependencies | |
run: uv pip install --all-extras -r pyproject.toml | |
- name: Install docs 'insiders' dependencies | |
run: ./docs/setup_insiders.sh | |
- name: Publish 'kolena' documentation to trunk (S3) | |
if: inputs.environment != 'production' | |
run: | | |
uv run mkdocs build --verbose --strict --config-file mkdocs.insiders.yml | |
aws s3 sync ./site "s3://trunk-docs.kolena.io" --delete | |
aws cloudfront create-invalidation --no-cli-pager --distribution-id ${{ secrets.TRUNK_DOC_DISTRIBUTION_ID }} --paths "/*" | |
aws s3 sync ./site "s3://trunk-docs.kolena.com" --delete | |
aws cloudfront create-invalidation --no-cli-pager --distribution-id ${{ secrets.TRUNK_DOC_COM_DISTRIBUTION_ID }} --paths "/*" | |
- name: Publish 'kolena' documentation to production (S3) | |
if: inputs.environment == 'production' | |
run: | | |
uv run mkdocs build --verbose --strict --config-file mkdocs.insiders.yml | |
aws s3 sync ./site "s3://docs.kolena.io" --delete | |
aws cloudfront create-invalidation --no-cli-pager --distribution-id ${{ secrets.DOC_DISTRIBUTION_ID }} --paths "/*" | |
aws s3 sync ./site "s3://docs.kolena.com" --delete | |
aws cloudfront create-invalidation --no-cli-pager --distribution-id ${{ secrets.DOC_COM_DISTRIBUTION_ID }} --paths "/*" | |
env: | |
DD_RUM_CLIENT_TOKEN: ${{ vars.DD_RUM_CLIENT_TOKEN }} | |
DD_RUM_APPLICATION_ID: ${{ vars.DD_RUM_APPLICATION_ID }} |