Skip to content

Updating and Fixing all metadata and playground related scripts #2

Updating and Fixing all metadata and playground related scripts

Updating and Fixing all metadata and playground related scripts #2

Workflow file for this run

name: Docs Metadata
on:
pull_request:
paths:
- 'playbook/app/pb_kits/playbook/**'
- 'playbook-website/app/javascript/components/Website/src/components/AvailableProps/globalPropsValues.ts'
- 'playbook-website/scripts/generate-global-props-values.mjs'
- 'playbook/scripts/**'
- 'scripts/generate-docs-metadata.sh'
- 'package.json'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
check-drift:
name: Check generated docs metadata
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '22.15.1'
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Regenerate docs metadata
run: yarn generate:docs-metadata
- name: Fail if generated files drifted
run: |
if ! git diff --exit-code -- \
'playbook/app/pb_kits/playbook/*/kit.schema.json' \
'playbook/app/pb_kits/playbook/*/docs/_playground.json' \
'playbook/app/pb_kits/playbook/utilities/global-props.schema.json' \
'playbook-website/app/javascript/components/Website/src/components/AvailableProps/globalPropsValues.ts'
then
echo ""
echo "Generated docs metadata is out of sync. Run:"
echo " yarn generate:docs-metadata"
echo "Then commit the updated files."
exit 1
fi