rectgrid 0.1.1

Region operations on rectilinear grids with arbitrary unit systems.
Documentation
name: "Deploy to GitHub Pages"

on:
  workflow_dispatch:

permissions:
  contents: read
  pages: write
  id-token: write

concurrency:
  group: "pages"
  cancel-in-progress: false

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Git clone
        run: |
          git clone --depth 1 --branch "${GITHUB_REF_NAME}" \
          "https://github.com/${GITHUB_REPOSITORY}.git" .

      - name: Add wasm32 target
        run: rustup target add wasm32-unknown-unknown

      - name: Install wasm-pack
        run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

      - name: cargo test
        run: cargo test

      - name: wasm-pack build
        working-directory: ./examples
        run: wasm-pack build --target web --out-dir app --out-name app

      - name: Setup Pages
        uses: actions/configure-pages@v6

      - name: Upload artifact
        uses: actions/upload-pages-artifact@v5
        with:
          path: "./examples"

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