-
Notifications
You must be signed in to change notification settings - Fork 56
77 lines (62 loc) · 2.08 KB
/
build-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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Build Docs
on:
workflow_dispatch:
inputs:
package_dir:
required: true
type: string
package_name:
required: true
type: string
workflow_call:
inputs:
package_dir:
required: true
type: string
package_name:
required: true
type: string
secrets:
PYPI_API_TOKEN:
required: true
DOCS_DEPLOY_AWS_ACCESS_KEY:
required: true
DOCS_DEPLOY_AWS_API_SECRET:
required: true
permissions:
contents: read
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Virtual Env
run: python -m venv venv
- name: Install Package to Document
run: source venv/bin/activate && python -m pip install ${{ inputs.package_dir }}/
- name: Log Env
run: source venv/bin/activate && pip list
- name: List Files
run: ls venv/lib/python3.10/site-packages/livekit/rtc/resources
- name: List Files Up One
run: ls venv/lib/python3.10/site-packages
- name: Find ffi
run: find . | grep liblivekit_ffi.so
- name: Install pdoc
run: source venv/bin/activate && pip install --upgrade pdoc
- name: Build Docs
run: source venv/bin/activate && python -m pdoc ${{ inputs.package_name }} --docformat=google --output-dir docs
- name: S3 Upload
run: aws s3 cp docs/ s3://livekit-docs/${{ inputs.package_dir }} --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"