27 lines
666 B
YAML
27 lines
666 B
YAML
name: Build & Deploy (Nix)
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build with Nix
|
|
run: |
|
|
nix build .#teleuploader --impure --option sandbox false 2>&1
|
|
|
|
- name: Deploy (local — runner is on same VPS)
|
|
run: |
|
|
set -eu
|
|
STORE_PATH=$(readlink result)
|
|
sudo nix-env --profile /nix/var/nix/profiles/teleuploader --set "$STORE_PATH"
|
|
sudo systemctl restart teleuploader
|
|
sleep 3
|
|
sudo systemctl status teleuploader --no-pager | head -15 |