Skip to content

Commit

Permalink
CI: Publish Rust docs if they were generated
Browse files Browse the repository at this point in the history
Include the generated Rust documentation in the published docs, both for PR
and for main, if they were generated.

Signed-off-by: David Brown <david.brown@linaro.org>
  • Loading branch information
d3zd3z committed Jan 27, 2025
1 parent a5451e3 commit 441200d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/doc-publish-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ jobs:
if [ -f api-coverage/api-coverage.tar.xz ]; then
tar xf api-coverage/api-coverage.tar.xz -C api-coverage
fi
if [ -f rustdocs/rustdocs-output.tar.xz ]; then
tar xf rustdocs/rustdocs-output.tar.xz -C rustdocs
fi
- name: Configure AWS Credentials
if: steps.download-artifacts.outputs.found_artifact == 'true'
Expand All @@ -82,3 +85,8 @@ jobs:
s3://builds.zephyrproject.org/${{ github.event.repository.name }}/pr/${PR_NUM}/api-coverage \
--delete
fi
if [ -d rustdocs/rustdocs ]; then
aws s3 sync --quiet rustdocs/rustdocs/ \
s3://builds.zephyrproject.org/${{ github.event.repository.name }}/pr/${PR_NUM}/rustdocs \
--delete
fi
6 changes: 6 additions & 0 deletions .github/workflows/doc-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ jobs:
if [ -f api-coverage/api-coverage.tar.xz ]; then
tar xf api-coverage/api-coverage.tar.xz -C api-coverage
fi
if [ -f rustdocs/rustdocs-output.tar.xz ]; then
tar xf rustdocs/rustdocs-output.tar.xz -C rustdocs
fi
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
Expand All @@ -58,4 +61,7 @@ jobs:
if [ -d api-coverage/coverage-report ]; then
aws s3 sync --quiet api-coverage/coverage-report/ s3://docs.zephyrproject.org/api-coverage/${VERSION} --delete
fi
if [ -d rustdocs/rustdocs ]; then
aws s3 sync --quiet rustdocs/rustdocs/ s3://docs.zephyrproject.org/rustdocs/${VERSION} --delete
fi
aws s3 cp --quiet pdf-output/zephyr.pdf s3://docs.zephyrproject.org/${VERSION}/zephyr.pdf

0 comments on commit 441200d

Please sign in to comment.