fabianhauser.ch/.github/workflows/ci.yml

31 lines
713 B
YAML
Raw Permalink Normal View History

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
run: nix flake check
2024-09-28 21:40:07 +02:00
- name: Deploy
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)
nix run .#deploy