2024-11-12 20:51:36 -05:00
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
runs_on: docker
|
|
|
|
steps:
|
2024-11-13 09:39:43 -05:00
|
|
|
# - name: "Cache Nix store"
|
|
|
|
# uses: actions/cache@v3.0.8
|
|
|
|
# id: nix-cache
|
|
|
|
# with:
|
|
|
|
# path: /tmp/nixcache
|
|
|
|
# key: "${{ runner.os }}-nix-cache"
|
2024-11-12 20:57:40 -05:00
|
|
|
- uses: actions/checkout@v4
|
2024-11-12 20:51:36 -05:00
|
|
|
with:
|
|
|
|
ref: master
|
|
|
|
- uses: https://github.com/DeterminateSystems/nix-installer-action@main
|
2024-11-13 09:39:43 -05:00
|
|
|
# - name: "Import Nix store cache"
|
|
|
|
# if: "steps.nix-cache.outputs.cache-hit == 'true'"
|
|
|
|
# run: "nix-store --import < /tmp/nixcache"
|
2024-11-13 09:42:41 -05:00
|
|
|
- run: mkdir ~/.ssh; echo "$SSHKEY" > ~/.ssh/id_ed25519
|
2024-11-13 09:39:43 -05:00
|
|
|
name: "Setup ssh key"
|
2024-11-12 21:09:08 -05:00
|
|
|
with:
|
|
|
|
SSHKEY: ${{ secrets.DEPLOYKEY }}
|
2024-11-13 09:39:43 -05:00
|
|
|
- run: 'nix develop --command deploy --remote-build root@zeus .'
|
|
|
|
# - 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"
|