echo "::group::Install dependencies"
npm ci
echo "::endgroup::"Log grouping keeps noisy steps readable.
Debug failing GitHub Actions workflows with log grouping, debug logging, step summaries, shell flags, and common troubleshooting patterns.
Make logs easier to inspect and turn on deeper diagnostics when needed.
echo "::group::Install dependencies"
npm ci
echo "::endgroup::"Log grouping keeps noisy steps readable.
echo "::notice title=Build::Build completed successfully"Workflow commands can create notices, warnings, and errors visible in the run UI.
echo "::warning file=package.json,line=1::Deprecated config detected"Annotations make important issues much easier to spot in long logs.
echo "::error file=src/app.js,line=42::Build failed"Useful when custom scripts want to surface failures in a GitHub-native way.
echo "## Test Summary" >> "$GITHUB_STEP_SUMMARY"Step summaries are excellent for concise results, links, and deployment info.
Avoid brittle shell scripts and diagnose common workflow failures.
set -euo pipefailThis catches missing variables and pipeline failures early.
jq . "$GITHUB_EVENT_PATH"Very useful when your workflow depends on event payload fields and conditions.
find . -maxdepth 3 -type f | sort | head -200A quick workspace listing often reveals wrong paths or missing artifacts.
- uses: actions/checkout@v4Pinned versions improve predictability and security compared with unpinned references.
for i in 1 2 3; do
npm install && break
sleep 5
doneUse sparingly for transient network issues while you investigate the real cause.