Files
TeleUploader/.gitea/workflows/deploy.yml
T
Claude 5bd3d286ce
Build & Deploy (Nix) / build-and-deploy (push) Failing after 11s
fix: use Nix official installer with --no-daemon
The Determinate Systems installer doesn't support --no-daemon.
Switch to the official Nix installer which has a well-documented
--no-daemon flag suitable for container/CI use.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-30 15:30:59 +07:00

33 lines
891 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: Install Nix
run: |
sh <(curl -L https://nixos.org/nix/install) --no-daemon 2>&1
echo "$HOME/.nix-profile/bin" >> "$GITHUB_PATH"
- name: Build with Nix
run: |
. "$HOME/.nix-profile/etc/profile.d/nix.sh"
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