2024-09-14 17:18:15 +02:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
|
2024-09-28 21:40:07 +02:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: "nix shell nixpkgs#git-lfs --command {0}"
|
2024-09-14 17:18:15 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2024-10-03 13:31:19 +02:00
|
|
|
runs-on: nix
|
2024-09-14 17:18:15 +02:00
|
|
|
steps:
|
2024-09-28 21:40:07 +02:00
|
|
|
- name: Initialize CI
|
|
|
|
uses: https://git.qo.is/qo.is/actions-nix-init@main
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: nix build
|
|
|
|
|
|
|
|
- name: Run Checks
|
2024-09-27 12:57:47 +02:00
|
|
|
run: nix flake check
|
2024-09-28 21:40:07 +02:00
|
|
|
|
|
|
|
- name: Deploy
|
2024-09-27 12:57:47 +02:00
|
|
|
if: success() && github.ref == 'refs/heads/main'
|
|
|
|
run: |
|
|
|
|
mkdir ~/.ssh/
|
|
|
|
echo -e "Host lindberg-webapps.backplane.net.qo.is\n StrictHostKeyChecking no" >> ~/.ssh/config
|
2024-09-28 21:40:07 +02:00
|
|
|
(umask 0077 && printf "%s" "${{ secrets.SSH_DEPLOY_KEY }}" > ~/.ssh/id_ed25519 && echo >> ~/.ssh/id_ed25519)
|
2024-09-27 12:57:47 +02:00
|
|
|
nix run .#deploy
|