Files
SpacetimeDB/.github/workflows/docs-update-llms.yaml
Zeke Foppa fead68c308 CI - enforce minimum pnpm package age (#5032)
# Description of Changes

Due to the relatively frequent supply chain attacks on especially npm
packages, we're instituting a minimum package age in the whole repo.

- Globally set a minimum npm package age in CI
- Best-effort set npm package age using `.npmrc` beside any
`package.json`
- Add CI checks that pnpm version and minimum package age values are the
same everywhere

# API and ABI breaking changes

None

# Expected complexity level and risk

2

# Testing

<!-- Describe any testing you've done, and any testing you'd like your
reviewers to do,
so that you're confident that all the changes work as expected! -->

- [x] CI passes
- [x] if I remove a `.npmrc` then `cargo ci lint` fails
- [x] if I change a value in `.npmrc` then `cargo ci lint` fails

---------

Signed-off-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2026-05-16 12:47:56 -07:00

68 lines
1.7 KiB
YAML

name: Docs / Update llms files
permissions:
contents: write
on:
push:
branches:
- docs/release
paths:
- 'docs/docs/**'
- 'skills/**'
workflow_dispatch: # Allow manual trigger
jobs:
update-llms:
runs-on: spacetimedb-new-runner-2
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: docs/release
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '22'
- uses: ./.github/actions/setup-pnpm
with:
run_install: true
- name: Get pnpm store directory
working-directory: sdks/typescript
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
working-directory: docs
run: pnpm install
- name: Docusaurus build
working-directory: docs
run: pnpm build
- name: Generate llms files
working-directory: docs
run: node scripts/generate-llms.mjs
- name: Commit updated llms files
working-directory: docs
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add static/llms.md
git diff --staged --quiet && echo "No changes" && exit 0
git commit -m "Update llms files from docs build"
git push