From 0a0747f58707f29ac8329a2c762c67b2823ff56a Mon Sep 17 00:00:00 2001 From: nrs23 Date: Mon, 20 Nov 2023 15:12:50 +0000 Subject: [PATCH] [CI][BUGFIX] Suppress runtime output so that github action doesn't hang --- .github/workflows/ci.yml | 4 +++- deploy-rust.sh | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4c73cd6..86a7acf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,8 @@ run-name: Deploy to DigitalOcean by @${{ github.actor }} on: push: branches: - - main, fix-ci + - main + - fix-ci jobs: deploy: @@ -36,3 +37,4 @@ jobs: fi echo 'Deployment successful to digital ocean' + exit 0 diff --git a/deploy-rust.sh b/deploy-rust.sh index 4c895e3..322d65d 100755 --- a/deploy-rust.sh +++ b/deploy-rust.sh @@ -14,11 +14,11 @@ if [ $? != 0 ]; then exit 1 fi -./target/release/api-example & +# If you don't pipe stderr/out to null then github's CI will never exit! +./target/release/api-example > /dev/null 2>&1 & # Capture PID of last executed command with `$!` # and use it to generate a kill script echo "kill $!" > ../stop-api.sh chmod +x ../stop-api.sh -exit 0