2026-05-19 17:56:12 -04:00
|
|
|
name: Deploy API
|
|
|
|
|
|
|
|
|
|
on:
|
|
|
|
|
push:
|
|
|
|
|
branches:
|
|
|
|
|
- main
|
|
|
|
|
paths:
|
|
|
|
|
- 'clio-api/**'
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
deploy:
|
|
|
|
|
runs-on: native
|
|
|
|
|
steps:
|
|
|
|
|
- name: Checkout code
|
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
|
|
- name: Deploy API files
|
|
|
|
|
run: |
|
|
|
|
|
/run/current-system/sw/bin/rsync -av --delete \
|
|
|
|
|
--exclude '.venv' \
|
|
|
|
|
--exclude '__pycache__' \
|
|
|
|
|
--exclude '*.pyc' \
|
|
|
|
|
--exclude 'recordings/' \
|
|
|
|
|
--exclude 'recordings.db' \
|
|
|
|
|
--exclude 'keys/' \
|
|
|
|
|
--exclude 'data/' \
|
|
|
|
|
--exclude '.git' \
|
|
|
|
|
--exclude 'nixos/' \
|
|
|
|
|
./clio-api/ \
|
|
|
|
|
/work/hosting/clio/clio-api/
|
|
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
|
run: |
|
|
|
|
|
cd /work/hosting/clio/clio-api
|
|
|
|
|
/run/current-system/sw/bin/uv sync
|
|
|
|
|
|
2026-05-19 20:24:58 -04:00
|
|
|
- name: Restart service
|
|
|
|
|
run: |
|
|
|
|
|
sudo /run/current-system/sw/bin/systemctl restart phone-recorder
|
|
|
|
|
|
2026-05-19 17:56:12 -04:00
|
|
|
- name: Verify deployment
|
2026-05-19 20:24:58 -04:00
|
|
|
run: |
|
|
|
|
|
ls -la /work/hosting/clio/clio-api/
|
|
|
|
|
sleep 2
|
|
|
|
|
curl -s https://recordings.hallocks.xyz/health || echo "Health check failed"
|