Skip to content

Commit 4ce9fda

Browse files
author
Patrick Widmer
committed
wip
1 parent a2ed504 commit 4ce9fda

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

.github/workflows/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM nixos/nix
2+
3+
ENV NIX_CONFIG=experimental-features = nix-command flakes pipe-operators
4+
5+
RUN git config --global --add safe.directory $(pwd)

.github/workflows/main.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ concurrency:
1212
group: pages
1313
cancel-in-progress: false
1414

15-
env:
16-
NIX_CONFIG: experimental-features = nix-command flakes pipe-operators
17-
1815
jobs:
1916
build:
2017
runs-on: ubuntu-latest
@@ -24,12 +21,12 @@ jobs:
2421

2522
- name: Build
2623
run: |
24+
docker build -t build-image .
2725
docker run --rm \
2826
-v ${{ github.workspace }}:/workspace \
2927
-w /workspace \
30-
-e NIX_CONFIG='experimental-features = nix-command flakes pipe-operators' \
31-
nixos/nix:latest \
32-
sh -c 'git config --global --add safe.directory $(pwd) && nix develop -c hugo --gc --minify'
28+
build-image \
29+
nix develop -c hugo --gc --minify
3330
3431
- name: Upload artifact
3532
uses: actions/upload-pages-artifact@v3

0 commit comments

Comments
 (0)