chore: constrain vulnerable transitive dependencies (#50) #84
This file contains hidden or 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
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | |
| # SPDX-License-Identifier: Apache-2.0 | |
| name: Documentation | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| paths: | |
| - ".github/workflows/docs.yml" | |
| - "Makefile" | |
| - "devtools/ddp/src/ddp/plugin_docs.py" | |
| - "devtools/ddp/src/ddp/package_index.py" | |
| - "catalog/plugins.json" | |
| - "docs/**" | |
| - "plugins/**/docs/**" | |
| - "pyproject.toml" | |
| - "uv.lock" | |
| - "zensical.toml" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/configure-pages@v5 | |
| if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' | |
| - uses: astral-sh/setup-uv@v4 | |
| with: | |
| python-version: "3.10" | |
| enable-cache: true | |
| - run: make sync | |
| - name: Prepare package list | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| GITHUB_REPOSITORY: ${{ github.repository }} | |
| run: | | |
| mkdir -p package-index-metadata | |
| PACKAGE_LIST=package-index-metadata/packages.json | |
| if { [ "${{ github.event_name }}" = "push" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ]; } \ | |
| && [ "${{ github.ref }}" = "refs/heads/main" ]; then | |
| ASSET_ID=$(gh api "repos/${GITHUB_REPOSITORY}/releases/tags/ddp-package-assets" \ | |
| --jq '.assets[] | select(.name == "packages.json") | .id' 2>/dev/null || true) | |
| if [ -n "${ASSET_ID}" ]; then | |
| gh api \ | |
| -H "Accept: application/octet-stream" \ | |
| "repos/${GITHUB_REPOSITORY}/releases/assets/${ASSET_ID}" > "${PACKAGE_LIST}" | |
| echo "Downloaded package list from ddp-package-assets/packages.json" | |
| else | |
| : > "${PACKAGE_LIST}" | |
| echo "No ddp-package-assets/packages.json asset found; building docs with an empty package list" | |
| fi | |
| else | |
| : > "${PACKAGE_LIST}" | |
| echo "Building docs with an empty package list for non-deploy event" | |
| fi | |
| wc -c "${PACKAGE_LIST}" | |
| - run: make docs PACKAGE_LIST=package-index-metadata/packages.json | |
| - uses: actions/upload-pages-artifact@v4 | |
| if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' | |
| with: | |
| path: site | |
| - uses: actions/upload-artifact@v4 | |
| if: github.event_name == 'pull_request' | |
| with: | |
| name: docs-site | |
| path: site | |
| if-no-files-found: error | |
| deploy: | |
| if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - uses: actions/deploy-pages@v4 | |
| id: deployment |