From 6393d247648b74168f7efc78444da256076db39f Mon Sep 17 00:00:00 2001 From: Jaya Venkatesh Date: Tue, 8 Sep 2026 14:49:34 -0700 Subject: [PATCH 1/2] added sudo to xsltproc --- publish-one-doc/action.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/publish-one-doc/action.yaml b/publish-one-doc/action.yaml index 8a5f4955..d65f73e3 100644 --- a/publish-one-doc/action.yaml +++ b/publish-one-doc/action.yaml @@ -69,8 +69,15 @@ runs: - name: Install Akamai CDN dependencies run: | - apt-get update - apt-get install -y --no-install-recommends xsltproc + # Check if we're running inside a CI container + if [ -f /.dockerenv ]; then + apt-get update + apt-get install -y --no-install-recommends xsltproc; + # Otherwise we'll need sudo + else + sudo apt-get update + sudo apt-get install -y --no-install-recommends xsltproc; + fi rapids-pip-retry install --upgrade pip rapids-pip-retry install -q httpie-edgegrid shell: bash From 55f2262c04ae840d2ff49ba02108ef0c0b24d39a Mon Sep 17 00:00:00 2001 From: Jaya Venkatesh Date: Tue, 8 Sep 2026 16:08:50 -0700 Subject: [PATCH 2/2] change if-else to cleaner format --- publish-docs/README.md | 2 +- publish-docs/action.yml | 14 ++++++-------- publish-one-doc/README.md | 2 +- publish-one-doc/action.yaml | 14 ++++++-------- 4 files changed, 14 insertions(+), 18 deletions(-) diff --git a/publish-docs/README.md b/publish-docs/README.md index cbbc1447..2242a852 100644 --- a/publish-docs/README.md +++ b/publish-docs/README.md @@ -4,7 +4,7 @@ GitHub Action for publishing documentation to S3 and flushing the Akamai CDN cac The action syncs a local docs directory to an S3 bucket, then submits an Akamai ECCU flush request so the updated content is served from `docs.nvidia.com`. -N.B. This action assumes it is being run inside a RAPIDS CI image. +N.B. This action installs its dependencies with `apt-get`, using `sudo` unless it is already running as root (as in the RAPIDS CI images). `rapids-pip-retry` from [gha-tools](https://github.com/rapidsai/gha-tools) must be on the `PATH`. ## Inputs diff --git a/publish-docs/action.yml b/publish-docs/action.yml index 150ed7b9..349c0ae9 100644 --- a/publish-docs/action.yml +++ b/publish-docs/action.yml @@ -73,15 +73,13 @@ runs: steps: - name: Install dependencies run: | - # Check if we're running inside a CI container - if [ -f /.dockerenv ]; then - apt-get update - apt-get install -y --no-install-recommends jq xsltproc; - # Otherwise we'll need sudo - else - sudo apt-get update - sudo apt-get install -y --no-install-recommends jq xsltproc; + # use sudo unless already running as root (e.g. inside a CI container) + sudo_cmd=() + if (( EUID != 0 )); then + sudo_cmd=(sudo) fi + "${sudo_cmd[@]}" apt-get update + "${sudo_cmd[@]}" apt-get install -y --no-install-recommends jq xsltproc rapids-pip-retry install --upgrade pip rapids-pip-retry install -q httpie-edgegrid # for Akamai CDN shell: bash diff --git a/publish-one-doc/README.md b/publish-one-doc/README.md index 7fdfb344..2a38ba9a 100644 --- a/publish-one-doc/README.md +++ b/publish-one-doc/README.md @@ -4,7 +4,7 @@ GitHub Action for publishing a single file to S3 and flushing the Akamai CDN cac The action uploads a local file to an S3 bucket, then submits an Akamai ECCU flush request so the updated content is served from `docs.nvidia.com`. -N.B. This action assumes it is being run inside a RAPIDS CI image. +N.B. This action installs its dependencies with `apt-get`, using `sudo` unless it is already running as root (as in the RAPIDS CI images). `rapids-pip-retry` from [gha-tools](https://github.com/rapidsai/gha-tools) must be on the `PATH`. ## Inputs diff --git a/publish-one-doc/action.yaml b/publish-one-doc/action.yaml index d65f73e3..99e50076 100644 --- a/publish-one-doc/action.yaml +++ b/publish-one-doc/action.yaml @@ -69,15 +69,13 @@ runs: - name: Install Akamai CDN dependencies run: | - # Check if we're running inside a CI container - if [ -f /.dockerenv ]; then - apt-get update - apt-get install -y --no-install-recommends xsltproc; - # Otherwise we'll need sudo - else - sudo apt-get update - sudo apt-get install -y --no-install-recommends xsltproc; + # use sudo unless already running as root (e.g. inside a CI container) + sudo_cmd=() + if (( EUID != 0 )); then + sudo_cmd=(sudo) fi + "${sudo_cmd[@]}" apt-get update + "${sudo_cmd[@]}" apt-get install -y --no-install-recommends xsltproc rapids-pip-retry install --upgrade pip rapids-pip-retry install -q httpie-edgegrid shell: bash