Nixos-Configuration/.forgejo/workflows/push.yaml
Jermeiah S 497664cf3d
Some checks failed
/ deploy (push) Has been cancelled
feature automated deployment now working! [deploy]
in order to get it working make sure [deploy] is inside the commit title
2025-06-20 15:13:28 -04:00

24 lines
796 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
echo -e "Host *\n StrictHostKeyChecking no\n UserKnownHostsFile=/dev/null" >> ~/.ssh/config
touch ./tmp
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'