Skip to content

Day 12, with at least an attempt at a 'real' solution... #87

Day 12, with at least an attempt at a 'real' solution...

Day 12, with at least an attempt at a 'real' solution... #87

Workflow file for this run

on:
push:
workflow_dispatch:
jobs:
lint-rust:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Add rustfmt/clippy
run: rustup component add rustfmt clippy
- name: Format check
run: cargo +stable fmt --check
working-directory: ./aoc2025_wasm
- name: Clippy
run: cargo +stable clippy -- --deny warnings
working-directory: ./aoc2025_wasm
lint-js:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: "24"
- name: Install JS/TS dependencies
run: npm install
- name: Lint JS/TS
run: npm run lint app/
build:
env:
NODE_ENV: production
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Build wasm library
run: wasm-pack build --target web
working-directory: ./aoc2025_wasm
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: "24"
- name: Install JS/TS dependencies
run: npm install
- name: Build JS/TS
run: npm run build
- name: Upload artifact
uses: actions/upload-artifact@v5
with:
name: out
path: |
out
if-no-files-found: error
retention-days: 1
deploy:
runs-on: ubuntu-latest
needs: [lint-rust, lint-js, build]
permissions:
contents: write
concurrency:
group: "pages"
cancel-in-progress: false
steps:
- uses: actions/download-artifact@v5
with:
name: out
path: out
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: out/
force_orphan: true