Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 73 additions & 3 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,21 @@ on:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash

permissions:
id-token: write
contents: read

jobs:
build:

deploy-to-docs-rapidsai-org:
name: Build (and deploy)
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -47,11 +51,77 @@ jobs:
# is resolved and deployed.
run: | # zizmor: ignore[adhoc-packages]
npm install --global --force @aschmidt8/netlify-cli

ARGS=""
if [ "$GITHUB_REF_NAME" = "main" ]; then
ARGS="--prod"
fi
netlify deploy "$ARGS" \
--debug \
--dir=_site

compute-docs-nvidia-com-matrix:
name: Compute docs.nvidia.com matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false
- name: Set matrix
id: set-matrix
env:
PROJECTS: cudf,cugraph,cuml,nvforest,rmm
run: |
MATRIX=$(
jq --compact-output --arg projects "$PROJECTS" '
($projects | split(",")) as $allowed |
[to_entries[] | select(.key | IN($allowed[])) | .key as $project | .value | to_entries[] |
{"project": $project, "named-version": .key, "numeric-version": .value}]' \
ci/customization/projects-to-versions.json
)
echo "matrix=${MATRIX}" >> "${GITHUB_OUTPUT}"

publish-to-docs-nvidia-com:
name: Publish to docs.nvidia.com
container:
image: rapidsai/ci-conda:26.10-latest
options: -e _NOOP
needs: compute-docs-nvidia-com-matrix
permissions:
id-token: write
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.compute-docs-nvidia-com-matrix.outputs.matrix) }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@e7f100cf4c008499ea8adda475de1042d6975c7b # v6.2.0
with:
aws-region: ${{ vars.AWS_REGION }}
role-to-assume: ${{ vars.AWS_ROLE_ARN }}
- name: Download docs
env:
PROJECT: ${{ matrix['project'] }}
NUMERIC_VERSION: ${{ matrix['numeric-version'] }}
run: |
aws s3 sync "s3://rapidsai-docs/${PROJECT}/html/${NUMERIC_VERSION}" ./docs/
- name: Publish to docs.nvidia.com
uses: rapidsai/shared-actions/publish-docs@main
with:
akamai_access_token: ${{ secrets.NVIDIA_DOCS_AKAMAI_ACCESS_TOKEN }}
akamai_client_secret: ${{ secrets.NVIDIA_DOCS_AKAMAI_CLIENT_SECRET }}
akamai_client_token: ${{ secrets.NVIDIA_DOCS_AKAMAI_CLIENT_TOKEN }}
akamai_emails_to_notify: ${{ secrets.NVIDIA_DOCS_AKAMAI_EMAILS_TO_NOTIFY }}
akamai-host: ${{ secrets.NVIDIA_DOCS_AKAMAI_HOST }}
akamai-request-name: rapidsai-docs-${{ matrix['project'] }}-${{ matrix['named-version'] }}
dry-run: false
source-path: ./docs/
target_aws_access_key_id: ${{ secrets.NVIDIA_DOCS_AWS_ACCESS_KEY_ID }}
target_aws_region: ${{ secrets.NVIDIA_DOCS_AWS_REGION }}
target_aws_secret_access_key: ${{ secrets.NVIDIA_DOCS_AWS_SECRET_ACCESS_KEY }}
target_s3_bucket: ${{ secrets.NVIDIA_DOCS_S3_BUCKET }}
target-s3-key-suffix: ${{ matrix['named-version'] }}
target-s3-key: ${{ matrix['project'] }}
68 changes: 68 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
needs:
- check-style
- docs
- publish-to-docs-nvidia-com
permissions:
actions: read
contents: read
Expand Down Expand Up @@ -63,3 +64,70 @@ jobs:
role-duration-seconds: 7200
- name: Assemble and validate complete documentation site
run: make assemble

compute-docs-nvidia-com-matrix:
name: Compute docs.nvidia.com matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false
- name: Set matrix
id: set-matrix
env:
PROJECTS: cudf,cugraph,cuml,nvforest,rmm
run: |
MATRIX=$(
jq --compact-output --arg projects "$PROJECTS" '
($projects | split(",")) as $allowed |
[to_entries[] | select(.key | IN($allowed[])) | .key as $project | .value | to_entries[] |
{"project": $project, "named-version": .key, "numeric-version": .value}]' \
ci/customization/projects-to-versions.json
)
echo "matrix=${MATRIX}" >> "${GITHUB_OUTPUT}"

publish-to-docs-nvidia-com:
name: Publish to docs.nvidia.com
container:
image: rapidsai/ci-conda:26.10-latest
options: -e _NOOP
needs: compute-docs-nvidia-com-matrix
permissions:
id-token: write
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.compute-docs-nvidia-com-matrix.outputs.matrix) }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@e7f100cf4c008499ea8adda475de1042d6975c7b # v6.2.0
with:
aws-region: ${{ vars.AWS_REGION }}
role-to-assume: ${{ vars.AWS_ROLE_ARN }}
- name: Download docs
env:
PROJECT: ${{ matrix['project'] }}
NUMERIC_VERSION: ${{ matrix['numeric-version'] }}
run: |
aws s3 sync "s3://rapidsai-docs/${PROJECT}/html/${NUMERIC_VERSION}" ./docs/
- name: Publish to docs.nvidia.com
uses: rapidsai/shared-actions/publish-docs@main
with:
akamai_access_token: ${{ secrets.NVIDIA_DOCS_AKAMAI_ACCESS_TOKEN }}
akamai_client_secret: ${{ secrets.NVIDIA_DOCS_AKAMAI_CLIENT_SECRET }}
akamai_client_token: ${{ secrets.NVIDIA_DOCS_AKAMAI_CLIENT_TOKEN }}
akamai_emails_to_notify: ${{ secrets.NVIDIA_DOCS_AKAMAI_EMAILS_TO_NOTIFY }}
akamai-host: ${{ secrets.NVIDIA_DOCS_AKAMAI_HOST }}
akamai-request-name: rapidsai-docs-${{ matrix['project'] }}-${{ matrix['named-version'] }}
dry-run: true
source-path: ./docs/
target_aws_access_key_id: ${{ secrets.NVIDIA_DOCS_AWS_ACCESS_KEY_ID }}
target_aws_region: ${{ secrets.NVIDIA_DOCS_AWS_REGION }}
target_aws_secret_access_key: ${{ secrets.NVIDIA_DOCS_AWS_SECRET_ACCESS_KEY }}
target_s3_bucket: ${{ secrets.NVIDIA_DOCS_S3_BUCKET }}
target-s3-key-suffix: ${{ matrix['named-version'] }}
target-s3-key: ${{ matrix['project'] }}
Loading