-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Propogate error when docsbuild fails, add docs build to CI. (#1852)
* Fix CI case where no projects are modified. `if args.dirty_projects:` was evaluating to false when the project list was empty. Explicitly check for `None` instead. * Propogate error when docsbuild fails. * Fix rst syntax. /home/runner/work/cccl/cccl/docs/libcudacxx/extended_api/math.rst:22: ERROR: Unknown target name: "blocks". * Build docs in PR CI. * Remove dead code.
- Loading branch information
1 parent
fd001a4
commit ed39098
Showing
7 changed files
with
83 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: "CCCL Docs Build/Upload" | ||
description: "Builds the docs and uploads them as workflow and pages artifacts." | ||
|
||
inputs: | ||
upload_workflow_artifact: | ||
description: "Uploads the built docs as a workflow artifact (actions/upload-artifact)." | ||
required: false | ||
default: "true" | ||
upload_pages_artifact: | ||
description: "Uploads the built docs as a workflow artifact (actions/upload-pages-artifact). Required for docs-deploy action." | ||
required: false | ||
default: "true" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
|
||
# Build all docs | ||
- name: Build all docs | ||
shell: bash --noprofile --norc -euo pipefail {0} | ||
run: ./docs/gen_docs.bash | ||
|
||
# Copy all docs to the right folder | ||
- name: Move docs to right folder | ||
shell: bash --noprofile --norc -euo pipefail {0} | ||
run: | | ||
mkdir _site | ||
cp -rf ./docs/_build/docs/cccl/latest/* _site | ||
mkdir _site/cub | ||
cp -rf ./docs/_build/docs/cub/latest/* _site/cub | ||
mkdir _site/libcudacxx | ||
cp -rf ./docs/_build/docs/libcudacxx/latest/* _site/libcudacxx | ||
mkdir _site/thrust | ||
cp -rf ./docs/_build/docs/thrust/latest/* _site/thrust | ||
./docs/scrape_docs.bash ./_site | ||
# Update docs as workflow artifact: | ||
- name: Upload artifact | ||
if: ${{ inputs.upload_workflow_artifact == 'true' }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: docs | ||
path: _site/ | ||
compression-level: 0 | ||
|
||
# Upload docs as pages artifacts | ||
- name: Upload artifact | ||
if: ${{ inputs.upload_pages_artifact == 'true' }} | ||
uses: actions/upload-pages-artifact@v3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters