oci-zero 0.2.1

A no-std, allocation-free streaming core for OCI registries
Documentation
name: Pages

on:
  push:
    branches: [main]
    paths:
      - web/**
      # web/build.sh resolves dependencies through the root workspace lockfile.
      - Cargo.lock
      - .github/workflows/pages.yml
  workflow_dispatch:

permissions:
  contents: read

concurrency:
  group: pages
  cancel-in-progress: true

jobs:
  build:
    name: Build proxyless page
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
      - uses: dtolnay/rust-toolchain@d1031067263f94b142dd6c0ce24c5eb9d02d52a0 # v1
        with:
          toolchain: stable
          targets: wasm32-unknown-unknown
      - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
        with:
          prefix-key: oci-zero-v2
          shared-key: wasm-release
          cache-bin: false
          cache-directories: ~/.cache/.wasm-pack
      - uses: taiki-e/install-action@d438492cf8a250514fa2d34b30bc3c0dc37c65ff # v2.87.8
        with:
          tool: wasm-pack@0.15.0
      - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
        with:
          node-version: "24"
          cache: npm
          cache-dependency-path: web/package-lock.json
      - name: Build WebAssembly package
        run: web/build.sh
      # The flasher inlines esptool-js, so its dependencies have to be present.
      - run: npm ci
        working-directory: web
      - name: Build self-contained pages
        run: |
          node build-proxyless.mjs
          node build-flash.mjs
        working-directory: web
      - name: Assemble Pages site
        run: |
          mkdir -p _site
          cp web/dist/proxyless.html _site/index.html
          cp web/dist/flash.html _site/flash.html
      - uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
        with:
          path: _site

  deploy:
    name: Deploy to GitHub Pages
    needs: build
    runs-on: ubuntu-latest
    permissions:
      pages: write
      id-token: write
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    steps:
      - id: deployment
        uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1