Hide build info and fix deploy workflow
This commit is contained in:
@@ -31,22 +31,13 @@ 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:
|
||||
@@ -65,14 +56,9 @@ jobs:
|
||||
DEPLOY_USER: ${{ secrets.IMPORTARR_DEPLOY_USER }}
|
||||
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;
|
||||
"sudo -n /bin/sh -c 'set -eu; cd /opt/importarr/repo;
|
||||
test -z \"\$(git status --porcelain)\";
|
||||
git fetch --prune origin main;
|
||||
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"
|
||||
/bin/sh deploy/repo-upgrade.sh \"\" $DEPLOY_SHA'"
|
||||
|
||||
Reference in New Issue
Block a user