trunk 0.21.14

Build, bundle & ship your Rust WASM application to the web.
name: Pages
on:
  # Only run after a successful release
  workflow_call:
  # Allow running manually
  workflow_dispatch:

permissions:
  contents: write

concurrency: pages

jobs:
  docs:
    uses: ./.github/workflows/docs.yaml

  deploy:
    runs-on: ubuntu-22.04
    needs:
      - docs

    steps:
      - name: Setup | Checkout
        uses: actions/checkout@v4
        with:
          submodules: recursive

      - name: Setup | Zola
        run: |
          wget -qO- https://github.com/getzola/zola/releases/download/v0.18.0/zola-v0.18.0-x86_64-unknown-linux-gnu.tar.gz | tar -xzf -
          sudo install zola /usr/local/bin/zola

      - name: Build | Zola
        run: |
          cd site
          zola build

      - name: Fetch | Docs
        id: fetch-docs
        uses: actions/download-artifact@v4
        with:
          name: book
          path: site/public/guide

      - name: Dump | Site
        run: |
          find ./site/public

      - name: Deploy
        uses: peaceiris/actions-gh-pages@v4
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./site/public
          cname: trunkrs.dev