fix(ci): add @uix/stream to build pipeline #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy to Cloudflare Pages | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| deployments: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build packages | |
| run: | | |
| pnpm -F @uix/core build | |
| pnpm -F @uix/lucid-tokens build | |
| pnpm -F @uix/stream build | |
| pnpm -F @uix/agent build | |
| - name: Build Web | |
| run: pnpm -F web build | |
| - name: Build Storybook | |
| run: pnpm -F @uix/storybook build | |
| - name: Merge builds | |
| run: | | |
| mkdir -p dist | |
| # Copy Web to root | |
| cp -r apps/web/dist/* dist/ | |
| # Copy Storybook to /storybook/ | |
| mkdir -p dist/storybook | |
| cp -r apps/storybook/storybook-static/* dist/storybook/ | |
| - name: Deploy to Cloudflare Pages | |
| env: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| run: | | |
| npx wrangler pages project create uix --production-branch=main 2>/dev/null || true | |
| npx wrangler pages deploy dist --project-name=uix |