Skip to content

Commit

Permalink
[CI][BUGFIX] Suppress runtime output so that github action doesn't hang
Browse files Browse the repository at this point in the history
  • Loading branch information
nrs23 committed Nov 20, 2023
1 parent e7426b7 commit 0a0747f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ run-name: Deploy to DigitalOcean by @${{ github.actor }}
on:
push:
branches:
- main, fix-ci
- main
- fix-ci

jobs:
deploy:
Expand Down Expand Up @@ -36,3 +37,4 @@ jobs:
fi
echo 'Deployment successful to digital ocean'
exit 0
4 changes: 2 additions & 2 deletions deploy-rust.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 0a0747f

Please sign in to comment.