Skip to content

fix: accept Claude URL elicitation notifications (#1383) #1290

fix: accept Claude URL elicitation notifications (#1383)

fix: accept Claude URL elicitation notifications (#1383) #1290

Workflow file for this run

name: Docs Website
on:
pull_request:
branches: [main]
paths:
- 'website/**'
- 'knowledge-base/rules.json'
- 'scripts/generate-docs-rules.py'
- '.github/workflows/**'
- 'crates/agnix-cli/tests/docs_website_parity.rs'
- 'crates/agnix-wasm/**'
- 'crates/agnix-core/**'
- 'crates/agnix-rules/**'
push:
branches: [main]
paths:
- 'website/**'
- 'knowledge-base/rules.json'
- 'scripts/generate-docs-rules.py'
- '.github/workflows/**'
- 'crates/agnix-cli/tests/docs_website_parity.rs'
- 'crates/agnix-wasm/**'
- 'crates/agnix-core/**'
- 'crates/agnix-rules/**'
workflow_dispatch:
permissions:
contents: read
defaults:
run:
shell: bash
concurrency:
group: docs-site-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build docs site
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Lint workflow files
uses: rhysd/actionlint@914e7df21a07ef503a81201c76d2b11c789d3fca # v1.7.12
# No `args`: with none, actionlint discovers and checks every workflow
# under .github/workflows. Two things were needed for this step to gate
# workflow changes at all: dropping the `args: docs-site.yml` pin, and
# widening this workflow's own `paths:` filters to `.github/workflows/**`
# so a PR touching only another workflow actually triggers it. Note a
# directory argument does NOT work
# ("read .github/workflows/: is a directory") - verified locally with
# v1.7.12, which is also why this is a no-arg invocation rather than a
# widened path. actionlint runs shellcheck over `run:` blocks, so this
# covers the shell in those steps too.
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: 'website/package-lock.json'
- uses: dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 # stable
with:
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Install wasm-pack
run: cargo install wasm-pack --version 0.13.1 --locked
- name: Install website dependencies
run: npm --prefix website ci
- name: Build WASM package
run: npm --prefix website run build:wasm
- name: Generate rule docs
run: npm --prefix website run generate:rules
- name: Build Docusaurus site
if: github.event_name != 'pull_request'
# 420+ generated rule pages plus versioned snapshots push webpack/SSG
# past Node's default heap. Keep the production build path, but give
# it enough heap and serialize SSG so the complete reference ships.
env:
NODE_OPTIONS: '--max-old-space-size=12288'
DOCUSAURUS_SSR_CONCURRENCY: '1'
# Keep source snapshots for every release, but deploy a small
# recent version window so GitHub Pages does not have to sync
# thousands of generated historical rule pages on every push.
AGNIX_DOCS_VERSION_LIMIT: '3'
run: npm --prefix website run build:site
- name: Validate Docusaurus command
if: github.event_name == 'pull_request'
run: npm --prefix website run build:site:ci -- --help >/dev/null
- name: Run docs parity test
run: cargo test -p agnix-cli --test docs_website_parity
- name: Upload site artifact
if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: website/build
deploy:
name: Deploy to GitHub Pages
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
contents: read
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Configure Pages
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
with:
enablement: true
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0