forked from DGNum/dgnum.eu
feat(workflows): Switch to nix runner
This commit is contained in:
parent
d9a0f7ad5e
commit
c948d74afa
2 changed files with 1 additions and 39 deletions
|
@ -1,31 +0,0 @@
|
||||||
name: Cache the SSG build
|
|
||||||
run-name: cache-ssg
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- 'ssg/**'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-cache:
|
|
||||||
runs-on: debian-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
path: dgnum.eu
|
|
||||||
|
|
||||||
- name: Install sudo
|
|
||||||
run: apt update && apt install sudo
|
|
||||||
|
|
||||||
- name: Install Nix
|
|
||||||
uses: https://github.com/cachix/install-nix-action@v22
|
|
||||||
with:
|
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
|
||||||
|
|
||||||
- name: Install attic, build and cache
|
|
||||||
run: |
|
|
||||||
nix-env -iA npins
|
|
||||||
|
|
||||||
npins init
|
|
||||||
npins add github zhaofengli attic -b main
|
|
||||||
|
|
|
@ -8,19 +8,12 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
runs-on: debian-latest
|
runs-on: nix
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
path: dgnum.eu
|
path: dgnum.eu
|
||||||
|
|
||||||
- name: install sudo
|
|
||||||
run: apt update && apt install sudo
|
|
||||||
|
|
||||||
- uses: https://github.com/cachix/install-nix-action@v22
|
|
||||||
with:
|
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
|
||||||
|
|
||||||
- name: Build website
|
- name: Build website
|
||||||
run: |
|
run: |
|
||||||
# Hack to set the cache in the working directory
|
# Hack to set the cache in the working directory
|
||||||
|
|
Loading…
Reference in a new issue