Files
TeleUploader/.gitea/workflows/deploy.yml
T
Claude 4acfa3d2e9
Build & Deploy (Nix) / build-and-deploy (push) Failing after 52s
fix: use Determinate Systems nix installer without --no-daemon
Re-instate Determinate Systems installer with correct flags:
- install --no-confirm (not --no-daemon which it doesn't support)
- Nix installs to /nix/var/nix/profiles/default/bin
- Source daemon profile in build step

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

34 lines
996 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: |
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix \
| sh -s -- install --no-confirm 2>&1
echo "/nix/var/nix/profiles/default/bin" >> "$GITHUB_PATH"
- name: Build with Nix
run: |
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh || true
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