soukoban 0.1.4

A library provides the implementation of some algorithms and data structures related to Sokoban
Documentation
name: Docs

on:
  push:
    branches: [main]

env:
  CARGO_TERM_COLOR: always

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

jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@stable

      - uses: actions/cache@v4
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}

      - name: Build docs
        run: cargo doc --no-deps

      - name: Add redirect
        run: echo '<meta http-equiv="refresh" content="0;url=soukoban/index.html">' > target/doc/index.html

      - name: Upload pages artifact
        uses: actions/upload-pages-artifact@v3
        with:
          path: target/doc

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