This commit is contained in:
Chris Dombroski 2024-11-12 22:02:59 -05:00
parent 65d94e70f9
commit fc0c30e400

View file

@ -4,11 +4,23 @@ jobs:
deploy: deploy:
runs_on: docker runs_on: docker
steps: steps:
- name: "Cache Nix store"
uses: actions/cache@v3.0.8
id: nix-cache
with:
path: /tmp/nixcache
key: "${{ runner.os }}-nix-cache"
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
ref: master ref: master
- uses: https://github.com/DeterminateSystems/nix-installer-action@main - uses: https://github.com/DeterminateSystems/nix-installer-action@main
- name: "Import Nix store cache"
if: "steps.nix-cache.outputs.cache-hit == 'true'"
run: "nix-store --import < /tmp/nixcache"
- uses: https://github.com/LuisEnMarroquin/setup-ssh-action@v2.0.5 - uses: https://github.com/LuisEnMarroquin/setup-ssh-action@v2.0.5
with: with:
SSHKEY: ${{ secrets.DEPLOYKEY }} SSHKEY: ${{ secrets.DEPLOYKEY }}
- run: 'nix develop --command deploy .' - run: 'nix develop --command deploy .'
- name: "Export Nix store cache"
if: "steps.nix-cache.outputs.cache-hit != 'true'"
run: "nix-store --export $(find /nix/store -maxdepth 1 -name '*-*') > /tmp/nixcache"