Skip to content

2.15.1

2.15.1 #756

Workflow file for this run

name: Publish Docs
on:
workflow_dispatch:
inputs:
dry_run:
description: Dry run (only list files, don't upload)
default: true
type: boolean
ref:
description: Git ref to get docs from (branch, tag, or SHA)
default: main
type: string
release:
types: [published]
permissions:
contents: read
jobs:
symbol-graph:
name: Symbol Graph (${{ matrix.artifact_name }})
runs-on: macos-26
strategy:
matrix:
include:
- platform: "iOS Simulator,name=iPhone 17 Pro,OS=26.5"
artifact_name: symbol-graph-ios
- platform: "macOS"
artifact_name: symbol-graph-macos
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ github.event_name == 'release' && github.event.release.tag_name || github.event.inputs.ref || 'main' }}
fetch-depth: 0
fetch-tags: true
- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Build for Release - Symbol Graph
run: |
set -o pipefail && xcodebuild build \
-scheme LiveKit \
-configuration Release \
-destination 'platform=${{ matrix.platform }}' \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
OTHER_SWIFT_FLAGS="-Xfrontend -emit-symbol-graph -Xfrontend -emit-symbol-graph-dir -Xfrontend \"${PWD}/symbol-graph\"" \
DOCC_EXTRACT_EXTENSION_SYMBOLS=YES \
| xcbeautify --renderer github-actions
- name: Upload Symbol Graph
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.artifact_name }}
path: symbol-graph
publish:
name: Publish Docs
needs: symbol-graph
runs-on: macos-26
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ github.event_name == 'release' && github.event.release.tag_name || github.event.inputs.ref || 'main' }}
fetch-depth: 0
fetch-tags: true
- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Download Symbol Graphs
uses: actions/download-artifact@v8
with:
pattern: symbol-graph-*
path: symbol-graphs
- name: Build Docs
run: |
$(xcrun --find docc) convert \
Sources/LiveKit/LiveKit.docc \
--output-dir docs \
--additional-symbol-graph-dir symbol-graphs \
--transform-for-static-hosting \
--hosting-base-path /reference/client-sdk-swift/
- name: List Files
run: ls -la docs
- name: S3 Upload
if: github.event_name == 'release' || github.event.inputs.dry_run != 'true'
run: aws s3 cp docs/ s3://livekit-docs/client-sdk-swift --recursive
env:
AWS_ACCESS_KEY_ID: ${{ secrets.DOCS_DEPLOY_AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.DOCS_DEPLOY_AWS_API_SECRET }}
AWS_DEFAULT_REGION: "us-east-1"
- name: Invalidate cache
if: github.event_name == 'release' || github.event.inputs.dry_run != 'true'
run: aws cloudfront create-invalidation --distribution-id EJJ40KLJ3TRY9 --paths "/*"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.DOCS_DEPLOY_AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.DOCS_DEPLOY_AWS_API_SECRET }}
AWS_DEFAULT_REGION: "us-east-1"