From d47d3a3f34d592e89937e4f7dc71a2a480902818 Mon Sep 17 00:00:00 2001 From: Kristian Krsnik Date: Fri, 18 Aug 2023 18:56:57 +0200 Subject: [PATCH] updated workflow --- .github/workflows/hugo.yaml | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/hugo.yaml b/.github/workflows/hugo.yaml index 1b5051d..869460e 100644 --- a/.github/workflows/hugo.yaml +++ b/.github/workflows/hugo.yaml @@ -4,8 +4,7 @@ name: Deploy Hugo site to Pages on: # Runs on pushes targeting the default branch push: - branches: - - main + branches: ["main"] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -30,26 +29,34 @@ defaults: jobs: # Build job build: - runs-on: nixos/nix - steps: + runs-on: ubuntu-latest + container: + image: nixos/nix + env: + HUGO_VERSION: 0.114.0 + steps: - name: Checkout uses: actions/checkout@v3 with: submodules: recursive - fetch-depth: 0 - name: Setup Pages id: pages uses: actions/configure-pages@v3 - - name: Build with Hugo - run: "nix build --experimental-features 'nix-command flakes' && cp -r result/. public/" + - name: Build with Nix + run: "nix build --experimental-features 'nix-command flakes'" + - name: Copy public folder + run: "cp -r result/. public/" - name: Upload artifact - uses: actions/upload-pages-artifact@v1 + uses: actions/upload-pages-artifact@v2 with: path: ./public # Deployment job deploy: - runs-on: nixos/nix + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest needs: build steps: - name: Deploy to GitHub Pages