Skip to content

Commit

Permalink
Use timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
sylhare committed Aug 9, 2024
1 parent eb240f3 commit 715cace
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/gem-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,18 @@ jobs:
- name: Build jekyll site
run: bundle exec jekyll build
- name: Start Jekyll site
run: bundle exec jekyll serve
timeout-minutes: 0.2
run: |
timeout 10s bundle exec jekyll serve
exit_status=$?
if [ $exit_status -eq 124 ]
then
# If we need to force kill, then it works so we exit 0
exit 0
else
# Otherwise, we pass through the exit code of the command
exit $exit_status
fi
- name: Build the gem
continue-on-error: true
run: |
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/gem-github-page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,15 @@ jobs:
- name: Build jekyll site
run: bundle exec jekyll build
- name: Start Jekyll site
run: bundle exec jekyll serve
timeout-minutes: 0.2
run: |
timeout 10s bundle exec jekyll serve
exit_status=$?
if [ $exit_status -eq 124 ]
then
# If we need to force kill, then it works so we exit 0
exit 0
else
# Otherwise, we pass through the exit code of the command
exit $exit_status
fi

0 comments on commit 715cace

Please sign in to comment.