dgnum.eu/.forgejo/workflows/cache-ssg.yaml

32 lines
676 B
YAML
Raw Normal View History

2023-12-05 21:29:05 +01:00
name: Cache the SSG build
run-name: cache-ssg
on:
push:
paths:
- 'ssg/**'
2023-12-05 21:33:07 +01:00
- '.forgejo/workflows/cache-ssg.yaml'
2023-12-05 21:29:05 +01:00
jobs:
build-cache:
runs-on: debian-latest
steps:
- uses: actions/checkout@v3
with:
path: dgnum.eu
- name: Install sudo
2023-12-05 21:33:07 +01:00
run: apt-get update && apt-get install sudo
2023-12-05 21:29:05 +01:00
- 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: |
2023-12-05 21:33:07 +01:00
nix-env -i npins -f '<nixpkgs>'
2023-12-05 21:29:05 +01:00
npins init
npins add github zhaofengli attic -b main