Nixos-Configuration/.forgejo/workflows/push.yaml
Jermeiah S 88490256d5
All checks were successful
/ deploy (push) Successful in 49s
feature automated deployment now working! [deploy]
in order to get it working make sure [deploy] is inside the commit title
2025-06-20 15:14:40 -04:00

23 lines
703 B
YAML

on: [push]
jobs:
# check:
# runs-on: nix
# steps:
# - uses: https://code.forgejo.org/actions/checkout@v3
# - run: nix flake check .
deploy:
runs-on: nix
# needs: check
if: contains(github.event.head_commit.message, '[deploy]')
steps:
- uses: https://code.forgejo.org/actions/checkout@v3
- name: Setup SSH key
run: |
mkdir -p ~/.ssh
echo "$SSHKEY" > ./id_ed25519
chmod 600 ./id_ed25519
env:
SSHKEY: ${{ secrets.SSHKEY }}
- run: nix develop .#default -c deploy --skip-checks --ssh-user root --ssh-opts '-i ./id_ed25519 -o StrictHostKeyChecking=accept-new -o UserKnownHostsFile=/dev/null'