GitHub Actions step debug logs truncated
GitHub truncates very large step logs in the web UI. With ACTIONS_STEP_DEBUG enabled, a chatty step can blow past the display limit, so the relevant line is cut off even though it was produced.
What this error means
The log view shows a truncation notice and the detail you need is missing from the rendered output.
github-actions
##[warning]The logs for this step have been truncated because they exceeded the maximum size.Common causes
Debug logging produced more than the display limit
ACTIONS_STEP_DEBUG plus verbose tooling generated more log than the UI renders, truncating the tail.
How to fix it
Capture full logs to an artifact
- Redirect the noisy command output to a file and upload it as an artifact for the complete log.
- Scope debug logging to the step under investigation rather than the whole run.
- Download the artifact to read the untruncated output.
.github/workflows/ci.yml
- run: npm run build --verbose > build.log 2>&1 || (cat build.log; exit 1)
- if: always()
uses: actions/upload-artifact@v4
with:
name: build-log
path: build.logHow to prevent it
- Persist verbose logs to artifacts instead of relying on the UI view.
- Enable step debug narrowly to keep logs under the display limit.
Related guides
GitHub Actions "too many annotations" (only 10 shown)Fix the GitHub Actions situation where a step produces more annotations than the UI shows, so only the first…
GitHub Actions GITHUB_STEP_SUMMARY Not Showing or Too LargeFix GitHub Actions job summaries that do not render - writing to the wrong target, exceeding the per-step sum…