name: Book
on:
  push:
    branches: [main]
permissions:
  pages: write
  id-token: write
jobs:
  deploy:
    runs-on: ubuntu-latest
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    steps:
      - uses: actions/checkout@v4
      - uses: taiki-e/install-action@mdbook
      - run: mdbook build
      - uses: actions/upload-pages-artifact@v3
        with:
          path: book
      - id: deployment
        uses: actions/deploy-pages@v4
