ebcc8b7ca9
The actions/setup-node@v6.4.0 upgrade stopped auto-shimming yarn onto PATH via corepack. The yarn-plugin test spawns yarn via Node's child_process.spawn() which does a raw PATH lookup, causing ENOENT failures. Adding corepack: true ensures the yarn shim is available. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Fredrik Adelöw <freben@gmail.com>
63 lines
1.8 KiB
YAML
63 lines
1.8 KiB
YAML
name: Sync BUI Docs
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
sync-docs-ui:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Use Node.js 22.x
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
with:
|
|
node-version: 22.x
|
|
registry-url: https://registry.npmjs.org/ # Needed for auth
|
|
corepack: true
|
|
|
|
- name: yarn install
|
|
uses: backstage/actions/yarn-install@2cd6978b476cbdc39fec48346f8b6ca13199dd6a # v0.7.8
|
|
with:
|
|
cache-prefix: ${{ runner.os }}-v22.x
|
|
|
|
- name: Checkout backstage/docs-ui
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
repository: backstage/docs-ui
|
|
path: bui-external-docs
|
|
token: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}
|
|
|
|
- name: Configure Git
|
|
run: |
|
|
git config --global user.email noreply@backstage.io
|
|
git config --global user.name 'Github BUI Docs workflow'
|
|
|
|
- name: Install dependencies
|
|
working-directory: docs-ui
|
|
run: yarn install
|
|
|
|
- name: Build Docs UI
|
|
working-directory: docs-ui
|
|
run: |
|
|
yarn build
|
|
|
|
- name: Replace contents of bui-external-docs repo with docs build output
|
|
working-directory: bui-external-docs
|
|
run: |
|
|
git rm -rf .
|
|
cp -R ../docs-ui/dist/. .
|
|
|
|
- name: Commit to bui-storybook repo
|
|
working-directory: bui-external-docs
|
|
run: |
|
|
git add .
|
|
git commit -am "BUI Docs build for backstage/backstage@${{ github.sha }}"
|
|
git push
|