name: Deploy docs

on:
  push:
    branches:
      - release-25.11

jobs:
  build-and-deploy:
    runs-on: host

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Build documentation
        run: |
          STORE_PATH=$(nix build .#synix-docs --print-out-paths --no-link)
          echo "STORE_PATH=$STORE_PATH" >> $GITHUB_ENV

      - name: Update symlink
        run: ln -sfn ${{ env.STORE_PATH }} /var/www/doc
