improved cicd in prep for auto rollout
This commit is contained in:
parent
301216649f
commit
5361174df6
1 changed files with 17 additions and 4 deletions
|
|
@ -1,10 +1,23 @@
|
||||||
on: [push]
|
on: [push]
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
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
|
||||||
# - uses: DeterminateSystems/nix-installer-action@main
|
|
||||||
# - uses: DeterminateSystems/magic-nix-cache-action@main
|
|
||||||
- run: nix flake check .
|
- run: nix flake check .
|
||||||
# - run: echo hi
|
- run: nix develop
|
||||||
|
|
||||||
|
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" > ~/.ssh/id_rsa
|
||||||
|
chmod 600 ~/.ssh/id_rsa
|
||||||
|
env:
|
||||||
|
SSHKEY: ${{ secrets.SSHKEY }}
|
||||||
|
- run: deploy
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue