Skip to content

Commit

Permalink
chore: Update build command in node.js.yml workflow and ci_script.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
ROZ-MOFUMOFU-ME committed Nov 13, 2024
1 parent 412c057 commit 38af4d1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 21 deletions.
18 changes: 5 additions & 13 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,9 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Build

- name: Install Dependencies
run: npm install
- name: Run and Verify Start
run: |
npm start > start.log 2>&1 &
START_PID=$!
sleep 5
if grep -q "config.json file does not exist. Read the installation/setup instructions." start.log; then
echo "Error detected: config.json file does not exist."
kill $START_PID
exit 1
else
echo "Build and start completed successfully!"
fi

- name: Verify and Start
run: ./ci_script.sh
14 changes: 6 additions & 8 deletions ci_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ START_PID=$!
sleep 5

if grep -q "config.json file does not exist. Read the installation/setup instructions." start.log; then
echo "Error detected: config.json file does not exist."
echo "Build and start completed successfully!"
kill $START_PID
exit 1
exit 0
else
echo "Build and start completed successfully!"
fi

kill $START_PID

exit 0
echo "An unexpected error occurred!"
kill $START_PID
exit 1
fi

0 comments on commit 38af4d1

Please sign in to comment.