Skip to content

Commit 277af7e

Browse files
committed
ci: fix script injection in build-docs workflow
1 parent 883f27d commit 277af7e

1 file changed

Lines changed: 12 additions & 13 deletions

File tree

.github/workflows/build-docs.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
# This workflow will upload a Python Package using Twine when a release is created
2-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3-
4-
# This workflow uses actions that are not certified by GitHub.
5-
# They are provided by a third-party and are governed by
6-
# separate terms of service, privacy policy, and support
7-
# documentation.
8-
91
name: Build Docs
102

113
on:
@@ -50,24 +42,31 @@ jobs:
5042
submodules: recursive
5143

5244
- name: Install Package to Document
53-
run: python -m pip install ${{ inputs.package_dir }}/
45+
env:
46+
PACKAGE_DIR: ${{ inputs.package_dir }}
47+
run: python -m pip install "$PACKAGE_DIR/"
5448

5549
- name: Download ffi
50+
env:
51+
PACKAGE_NAME: ${{ inputs.package_name }}
5652
run: |
57-
if [[ '${{ inputs.package_name }}' = 'livekit.rtc' ]]; then
53+
if [[ "$PACKAGE_NAME" = 'livekit.rtc' ]]; then
5854
pip install requests
59-
python livekit-rtc/rust-sdks/download_ffi.py --output $(python -m site --user-site)/livekit/rtc/resources
55+
python livekit-rtc/rust-sdks/download_ffi.py --output "$(python -m site --user-site)/livekit/rtc/resources"
6056
fi
6157
6258
- name: Install pdoc
6359
run: pip install --upgrade pdoc
6460

6561
- name: Build Docs
66-
run: python -m pdoc ${{ inputs.package_name }} --docformat=google --output-dir docs
62+
env:
63+
PACKAGE_NAME: ${{ inputs.package_name }}
64+
run: python -m pdoc "$PACKAGE_NAME" --docformat=google --output-dir docs
6765

6866
- name: S3 Upload
69-
run: aws s3 cp docs/ s3://livekit-docs/${{ inputs.package_dir }} --recursive
7067
env:
68+
PACKAGE_DIR: ${{ inputs.package_dir }}
7169
AWS_ACCESS_KEY_ID: ${{ secrets.DOCS_DEPLOY_AWS_ACCESS_KEY }}
7270
AWS_SECRET_ACCESS_KEY: ${{ secrets.DOCS_DEPLOY_AWS_API_SECRET }}
7371
AWS_DEFAULT_REGION: "us-east-1"
72+
run: aws s3 cp docs/ "s3://livekit-docs/$PACKAGE_DIR" --recursive

0 commit comments

Comments
 (0)