Nixos-Configuration/.forgejo/workflows/push.yaml
Jermeiah S 2333f46b78
Some checks failed
/ check (push) Has been cancelled
/ 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 14:35:50 -04:00

25 lines
717 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
chmod 700 ~/.ssh
echo "$SSHKEY" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
echo -e "Host *\n StrictHostKeyChecking no\n UserKnownHostsFile=/dev/null" >> ~/.ssh/config
env:
SSHKEY: ${{ secrets.SSHKEY }}
- run: nix develop .#default --skip-check -c deploy