scope-local 0.3.2

Scope local storage
Documentation
name: CI

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
  cancel-in-progress: true

env:
  RUST_BACKTRACE: 1

jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: dtolnay/rust-toolchain@nightly
        with:
          components: clippy, rustfmt
      - name: Check format
        run: cargo fmt --all --check
      - name: Clippy
        run: cargo clippy -- -D warnings
      - name: Unit tests
        run: cargo test -- --nocapture

  doc:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: dtolnay/rust-toolchain@nightly
      - name: Build docs
        run: cargo doc --all-features --no-deps
        env:
          RUSTDOCFLAGS: --cfg docsrs -Z unstable-options --enable-index-page --generate-link-to-definition
      - name: Upload artifact
        uses: actions/upload-pages-artifact@v4
        with:
          path: target/doc

  deploy:
    runs-on: ubuntu-latest
    needs: doc
    if: ${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
    permissions:
      contents: read
      pages: write
      id-token: write
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    steps:
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v4