Skip to content

Merge pull request #82 from logannye/codex/v0.4-trustworthy-builder #6

Merge pull request #82 from logannye/codex/v0.4-trustworthy-builder

Merge pull request #82 from logannye/codex/v0.4-trustworthy-builder #6

Workflow file for this run

name: Deploy verifier to Pages
# Builds the in-browser "caught-you" receipt verifier (wasm) and publishes
# web/verify/ to GitHub Pages, so it is a shareable link.
on:
push:
branches: [main]
paths:
- "web/**"
- "crates/receipt/**"
- "crates/receipt-wasm/**"
- "scripts/build-wasm-verifier.sh"
- "docs/schema/**"
- "release/schemas/**"
- ".github/workflows/pages.yml"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
# One deploy at a time; let an in-progress run finish.
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: dtolnay/rust-toolchain@4be7066ada62dd38de10e7b70166bc74ed198c30 # stable
with:
toolchain: 1.83.0
targets: wasm32-unknown-unknown
- uses: taiki-e/install-action@c7eb1735f09259a5035e8e5d44b1406b1cddc0fb # v2
with:
tool: wasm-pack@0.14.0
- name: Build the verifier (wasm -> web/verify/pkg)
env:
RUSTUP_TOOLCHAIN: 1.83.0
run: scripts/build-wasm-verifier.sh
- name: Publish receipt and attestation schemas
run: |
mkdir -p web/schema
cp docs/schema/*.json web/schema/
cp release/schemas/*.json web/schema/
cp web/verify/schema/run-attestation-v1.schema.json web/schema/
- uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
- uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
with:
# Publish the whole site: web/index.html is the landing page (root),
# web/verify/ is the in-browser verifier (built into web/verify/pkg above).
path: web
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4