Files
SpacetimeDB/.github/workflows/docs-publish.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

57 lines
1.4 KiB
YAML

name: Docs / Publish
permissions:
contents: read
on:
push:
branches:
- docs/release
jobs:
build:
runs-on: spacetimedb-new-runner-2
steps:
- name: Checkout repository
uses: actions/checkout@v3
- 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: Publish docs to S3
uses: shallwefootball/s3-upload-action@master
with:
aws_key_id: ${{ secrets.DOCS_AWS_KEY_ID }}
aws_secret_access_key: ${{ secrets.DOCS_AWS_SECRET_ACCESS_KEY}}
aws_bucket: spacetimedb-docs
source_dir: docs/build
destination_dir: 'docs'