Show build info in header
Deploy live / test (push) Failing after 36s
Deploy live / deploy (push) Skipped

Deploy the CI-built wheel for the triggering SHA so the UI and\nbuild metadata stay in sync in production.
This commit is contained in:
2026-08-11 10:16:37 +02:00
parent 52701569c3
commit a93480e48a
5 changed files with 74 additions and 13 deletions
+20 -5
View File
@@ -31,13 +31,22 @@ jobs:
python -m pytest -q
npm --prefix frontend test -- --run
npm --prefix frontend run build
python -m pip wheel --no-deps --wheel-dir dist .
sh -n deploy/systemd-install.sh
sh -n deploy/repo-upgrade.sh
- uses: actions/upload-artifact@v4
with:
name: importarr-wheel
path: dist/*.whl
deploy:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: importarr-wheel
path: dist
- name: Configure deployment SSH
shell: bash
env:
@@ -54,10 +63,16 @@ jobs:
DEPLOY_HOST: ${{ secrets.IMPORTARR_DEPLOY_HOST }}
DEPLOY_PORT: ${{ secrets.IMPORTARR_DEPLOY_PORT }}
DEPLOY_USER: ${{ secrets.IMPORTARR_DEPLOY_USER }}
run: >-
ssh -p "$DEPLOY_PORT" -o BatchMode=yes "$DEPLOY_USER@$DEPLOY_HOST"
"sudo -n /bin/sh -c 'set -eu; cd /opt/importarr/repo;
DEPLOY_SHA: ${{ github.sha }}
run: |
WHEEL=$(find dist -maxdepth 1 -name 'importarr-*.whl' -print -quit)
test -n "$WHEEL"
scp -P "$DEPLOY_PORT" -o BatchMode=yes "$WHEEL" "$DEPLOY_USER@$DEPLOY_HOST:/tmp/importarr-deploy.whl"
ssh -p "$DEPLOY_PORT" -o BatchMode=yes "$DEPLOY_USER@$DEPLOY_HOST" \
"deploy_status=0; sudo -n /bin/sh -c 'set -eu; cd /opt/importarr/repo;
test -z \"\$(git status --porcelain)\";
git fetch --prune origin main;
git checkout -B main origin/main;
exec /bin/sh deploy/repo-upgrade.sh'"
git checkout --detach $DEPLOY_SHA;
/bin/sh deploy/repo-upgrade.sh /tmp/importarr-deploy.whl $DEPLOY_SHA' || deploy_status=\$?;
rm -f /tmp/importarr-deploy.whl;
exit \$deploy_status"