# SPDX-FileCopyrightText: 2023-2025 Steffen Vogel # SPDX-License-Identifier: Apache-2.0 # yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/github-workflow.json --- name: Build website on: push: tags: - 'v*' workflow_call: jobs: build: name: Build website runs-on: ubuntu-24.04 environment: release steps: - name: Checkout uses: actions/checkout@v5 - name: Setup Nix uses: cachix/install-nix-action@v31 with: nix_path: nixpkgs=channel:nixos-unstable - name: Setup Nix cache uses: cachix/cachix-action@v16 with: name: cunicu authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - name: Update Go modules run: | nix run .#scripts -- -modules-fetch -modules-file nix/modules.json git add nix/modules.json - name: Build website run: | nix build --print-build-logs .#website - name: Deploy to GitHub Pages if: startsWith(github.ref, 'refs/tags/v') && github.event_name == 'push' uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./result/ user_name: github-actions[bot] user_email: 41898282+github-actions[bot]@users.noreply.github.com