Merge pull request #150 from miniscope/audit/fixes #63
Workflow file for this run
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 GitHub Pages | |
| on: | |
| push: | |
| tags: ['v*'] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: 'pages' | |
| cancel-in-progress: true | |
| # Third-party actions pinned to SHAs; see ci.yml header for the procedure | |
| # to update a pin. | |
| jobs: | |
| # Gate the deploy on the same lint/typecheck/test suite that gates main. | |
| # CI passing on `main` doesn't transfer to a tag push — without this job | |
| # a tag can deploy commits that would fail CI. | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'npm' | |
| - run: npm ci | |
| # pkg/ is build-only/gitignored — build it before typecheck/test consume it. | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable (2026-04-15) | |
| with: | |
| targets: wasm32-unknown-unknown | |
| - name: Cache Rust dependencies | |
| uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | |
| with: | |
| workspaces: 'crates/solver -> target' | |
| - name: Install wasm-pack | |
| uses: taiki-e/install-action@e49978b799e49ff429d162b7a30601a569ab6538 # v2.81.1 | |
| with: | |
| tool: [email protected] | |
| - name: Build WASM | |
| run: npm run build:wasm | |
| - name: Format check | |
| run: npm run format:check | |
| - name: Lint | |
| run: npm run lint | |
| - name: Type check | |
| run: npm run typecheck | |
| - name: Tests | |
| run: npm run test | |
| deploy: | |
| needs: [check] | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'npm' | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable (2026-04-15) | |
| with: | |
| targets: wasm32-unknown-unknown | |
| - name: Cache Rust dependencies | |
| uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | |
| with: | |
| workspaces: 'crates/solver -> target' | |
| - name: Install wasm-pack | |
| uses: taiki-e/install-action@e49978b799e49ff429d162b7a30601a569ab6538 # v2.81.1 | |
| with: | |
| tool: [email protected] | |
| - run: npm ci | |
| - run: npm run build:pages | |
| env: | |
| VITE_SUPABASE_URL: ${{ secrets.SUPABASE_URL }} | |
| VITE_SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }} | |
| VITE_APP_VERSION: ${{ github.ref_name }} | |
| - uses: actions/configure-pages@v6 | |
| - uses: actions/upload-pages-artifact@v5 | |
| with: | |
| path: './dist/CaLab' | |
| - id: deployment | |
| uses: actions/deploy-pages@v5 |