Skip to content
Merged
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
21 changes: 2 additions & 19 deletions .github/workflows/docs-build.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
name: Docs

on:
pull_request:
push:
branches: [main]
types: [opened, synchronize]
paths:
- "docs/**"
push:
branches: [main]
workflow_dispatch:

defaults:
Expand All @@ -18,7 +15,7 @@ env:
MISE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -51,20 +48,6 @@ jobs:
path: _build/docs
if-no-files-found: error
retention-days: 1
- name: Store PR information
if: github.event_name == 'pull_request'
run: |
mkdir ./pr
echo ${{ github.event.number }} > ./pr/pr.txt
echo ${{ github.event.pull_request.merged }} > ./pr/merged.txt
echo ${{ github.event.action }} > ./pr/action.txt

- name: Upload PR information
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: pr
path: pr/

publish:
if: false # disabled until GitHub Pages is configured
Expand Down
53 changes: 46 additions & 7 deletions .github/workflows/docs-preview-pr.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,57 @@
name: docs-preview-pr

on:
workflow_run:
workflows: [Docs]
types: [completed]
branches-ignore: [main]
pull_request:
branches: [main]
types: [opened, reopened, synchronize, closed]
paths:
- "docs/**"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
group: preview-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: write
pull-requests: write
packages: read

defaults:
run:
shell: bash

env:
WF_ID: ${{ github.event.workflow_run.id }}
MISE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
preview:
uses: nvidia-merlin/.github/.github/workflows/docs-preview-pr-common.yaml@main
runs-on: build-arm64
container:
image: ghcr.io/nvidia/nemoclaw/ci:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install tools
run: mise install

- name: Build documentation
if: github.event.action != 'closed'
run: mise run docs:build:strict

- name: Delete unnecessary files
if: github.event.action != 'closed'
run: |
find _build -name .doctrees -prune -exec rm -rf {} \;
find _build -name .buildinfo -exec rm {} \;

- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./_build/docs/
preview-branch: gh-pages
umbrella-dir: pr-preview
action: auto
2 changes: 2 additions & 0 deletions deploy/docker/Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
socat \
unzip \
xz-utils \
jq \
rsync \
&& rm -rf /var/lib/apt/lists/*

# Install Docker CLI and buildx plugin used by CI jobs
Expand Down
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,3 +249,4 @@ troubleshooting

resources/eula
```

Loading