Skip to content

fix: copilot setup steps (#67) #8

fix: copilot setup steps (#67)

fix: copilot setup steps (#67) #8

# Copilot cloud agent bootstrap
# This file runs once when a Copilot cloud agent task starts. It installs all
# dependencies, builds the monorepo packages, and installs the Playwright browser
# so Storybook can be started and tested immediately without extra setup.
#
# After these steps complete, Storybook can be started with:
# pnpm storybook
# which starts on http://localhost:6006.
#
# The @storybook/test-runner interaction tests can then be run with:
# pnpm test:storybook
#
# Playwright screenshot/trace tests can be run with:
# pnpm test:demo (if kept)
name: Copilot setup steps
on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml
jobs:
copilot-setup-steps:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
# 1. Check out the repository before running any package-manager commands.
- name: Checkout repository
uses: actions/checkout@v5
# 2. Install the declared pnpm version so pnpm is available on PATH.
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0
# 3. Install the repository's Node.js version and enable pnpm dependency caching.
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: pnpm
# 4. Install all monorepo dependencies via pnpm workspaces.
- name: Install dependencies
run: pnpm install --frozen-lockfile
# 5. Build all workspace packages so Storybook can import them.
- name: Build packages
run: pnpm run build
# 6. Install the Chromium browser and its OS-level deps for Playwright / test-runner.
- name: Install Playwright browsers
run: pnpm exec playwright install chromium --with-deps