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
1fa2932b82
1 changed files with 13 additions and 11 deletions
|
|
@ -1,23 +1,25 @@
|
||||||
on: [push]
|
on: [push]
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
# check:
|
||||||
runs-on: nix
|
# runs-on: nix
|
||||||
steps:
|
# steps:
|
||||||
- uses: https://code.forgejo.org/actions/checkout@v3
|
# - uses: https://code.forgejo.org/actions/checkout@v3
|
||||||
- run: nix flake check .
|
# - run: nix flake check .
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: nix
|
runs-on: nix
|
||||||
needs: check
|
# needs: check
|
||||||
if: contains(github.event.head_commit.message, 'deploy:')
|
if: contains(github.event.head_commit.message, '[deploy]')
|
||||||
steps:
|
steps:
|
||||||
- uses: https://code.forgejo.org/actions/checkout@v3
|
- uses: https://code.forgejo.org/actions/checkout@v3
|
||||||
- run: nix develop
|
|
||||||
- name: Setup SSH key
|
- name: Setup SSH key
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "$SSHKEY" > ~/.ssh/id_rsa
|
chmod 700 ~/.ssh
|
||||||
chmod 600 ~/.ssh/id_rsa
|
echo "$SSHKEY" > ~/.ssh/id_ed25519
|
||||||
|
chmod 600 ~/.ssh/id_ed25519
|
||||||
|
echo -e "Host *\n StrictHostKeyChecking no\n UserKnownHostsFile=/dev/null" >> ~/.ssh/config
|
||||||
|
|
||||||
env:
|
env:
|
||||||
SSHKEY: ${{ secrets.SSHKEY }}
|
SSHKEY: ${{ secrets.SSHKEY }}
|
||||||
- run: deploy
|
- run: nix develop .#default -c deploy --skip-checks
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue