feature automated deployment now working! [deploy]
Some checks failed
/ deploy (push) Has been cancelled
Some checks failed
/ deploy (push) Has been cancelled
in order to get it working make sure [deploy] is inside the commit title
This commit is contained in:
parent
8b992b53d8
commit
497664cf3d
2 changed files with 13 additions and 11 deletions
1
$PWD.pub
Normal file
1
$PWD.pub
Normal file
|
|
@ -0,0 +1 @@
|
|||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINwJF0BNEY0CgA5kkZrzpv+sahs40anFO+JKTfFJIgqU sky@lappy
|
||||
|
|
@ -1,23 +1,24 @@
|
|||
on: [push]
|
||||
jobs:
|
||||
check:
|
||||
runs-on: nix
|
||||
steps:
|
||||
- uses: https://code.forgejo.org/actions/checkout@v3
|
||||
- run: nix flake check .
|
||||
# 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:')
|
||||
# needs: check
|
||||
if: contains(github.event.head_commit.message, '[deploy]')
|
||||
steps:
|
||||
- uses: https://code.forgejo.org/actions/checkout@v3
|
||||
- run: nix develop
|
||||
- name: Setup SSH key
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "$SSHKEY" > ~/.ssh/id_rsa
|
||||
chmod 600 ~/.ssh/id_rsa
|
||||
echo "$SSHKEY" > ./id_ed25519
|
||||
echo -e "Host *\n StrictHostKeyChecking no\n UserKnownHostsFile=/dev/null" >> ~/.ssh/config
|
||||
touch ./tmp
|
||||
|
||||
env:
|
||||
SSHKEY: ${{ secrets.SSHKEY }}
|
||||
- run: deploy
|
||||
- run: nix develop .#default -c deploy --skip-checks --ssh-user root --ssh-opts '-i ./id_ed25519 -o StrictHostKeyChecking=accept-new -o UserKnownHostsFile=/dev/null'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue