refactor(recipe): extract Carbonation + Cost + TastingCard sections #76
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 web build to GitHub Pages | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| # Required by actions/deploy-pages — Pages deploys use OIDC, not a token. | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Only one Pages deploy at a time. Don't cancel an in-flight deploy when a | |
| # new push lands; queue it so we never tear down the live site mid-update. | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| # vendor/beerjson submodule — @werb/validate fails to load | |
| # the BeerJSON schemas without it. | |
| submodules: recursive | |
| # Version comes from the "packageManager" field in root package.json. | |
| - uses: pnpm/action-setup@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - name: Install workspace | |
| run: pnpm install --frozen-lockfile | |
| # The BeerXML parser is a Rust crate compiled to WebAssembly. The | |
| # build:wasm script runs wasm-pack on the werb-beerxml-wasm crate | |
| # and writes its pkg/ output, which Vite then picks up as a | |
| # dynamic import. | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-unknown-unknown | |
| # taiki-e/install-action ships a maintained Node 24 runtime; | |
| # jetli/wasm-pack-action is pinned to Node 16 and on the | |
| # actions-deprecation track. | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: wasm-pack,mdbook | |
| - name: Build web bundle (incl. WASM) | |
| run: pnpm --filter @werb/desktop build | |
| env: | |
| # Repo is werb-dev/werb → site lives at /werb/. Adjust if a | |
| # custom domain gets wired up (then VITE_BASE=/). | |
| VITE_BASE: /werb/ | |
| # mdBook builds the user-facing documentation site. The output | |
| # is dropped under the PWA's `dist/docs/` so Pages serves it at | |
| # /werb/docs/ — relative URLs in the book stay correct because | |
| # mdBook emits them, and the PWA's base path covers everything | |
| # above the docs subdir. | |
| - name: Build docs (mdBook) | |
| run: | | |
| mdbook build docs | |
| mkdir -p apps/desktop/dist/docs | |
| cp -R docs/book/. apps/desktop/dist/docs/ | |
| - uses: actions/configure-pages@v6 | |
| - uses: actions/upload-pages-artifact@v5 | |
| with: | |
| path: apps/desktop/dist | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@v5 |