-
Notifications
You must be signed in to change notification settings - Fork 536
60 lines (51 loc) · 1.66 KB
/
publish-docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Publish docs
on:
workflow_dispatch:
workflow_call:
secrets:
DOCS_DEPLOY_AWS_ACCESS_KEY: {}
DOCS_DEPLOY_AWS_API_SECRET: {}
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
lfs: true
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Create and activate virtual environment
run: |
python -m venv venv
source venv/bin/activate
- name: Install pdoc and other dependencies
run: |
source venv/bin/activate
python -m pip install pdoc3 setuptools
- name: Install package
run: |
source venv/bin/activate
pip install ./livekit-agents
./livekit-plugins/install_local.sh
- name: Build Docs
run: |
source venv/bin/activate
python -m pdoc --skip-errors --html livekit --output-dir docs
- name: S3 Upload
run: |
source venv/bin/activate
aws s3 cp docs/ s3://livekit-docs/python --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: Expire cloudfront cache
run: |
aws cloudfront create-invalidation --distribution-id EJJ40KLJ3TRY9 --paths "/python/*"
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"