From 5f2808a91e787f3526c93957bd203385c88ca5e8 Mon Sep 17 00:00:00 2001 From: Jan Kremer Date: Sat, 1 Jun 2024 16:35:58 +0200 Subject: [PATCH] Meta: update flake and github action --- .github/workflows/main.yml | 17 +++++------------ flake.nix | 3 ++- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a81d39e..2d12100 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,26 +24,19 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: Setup Hugo - uses: peaceiris/actions-hugo@v3 - with: - hugo-version: 'latest' - # extended: true - name: Checkout uses: actions/checkout@v4 - with: - submodules: recursive - name: Setup Pages id: pages uses: actions/configure-pages@v4 + - name: Setup Nix + uses: DeterminateSystems/nix-installer-action@main - name: Build with Hugo - env: - HUGO_ENVIRONMENT: production - HUGO_ENV: production run: | - hugo \ + nix develop --command bash -c "hugo \ + --environment production \ --minify \ - --baseURL "${{ steps.pages.outputs.base_url }}/" + --baseURL '${{ steps.pages.outputs.base_url }}/'" - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: diff --git a/flake.nix b/flake.nix index c961bf6..f77f921 100644 --- a/flake.nix +++ b/flake.nix @@ -20,7 +20,8 @@ default = with pkgs; mkShell { - nativeBuildInputs = with pkgs; [ + name = "Hugo website"; + packages = with pkgs; [ go hugo ];