Skip to content

Commit 0dbc58e

Browse files
committed
ci: fix build summary
1 parent 306ac2e commit 0dbc58e

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
uses: actions/checkout@v4
2626

2727
- &setup
28-
name: Setup Environment
28+
name: Setup environment
2929
id: setup
3030
uses: ./.github/actions/setup-env
3131

@@ -106,15 +106,18 @@ jobs:
106106
run: |
107107
npm run build > >(tee build-output.log) 2> >(tee -a build-output.log >&2)
108108
109-
{
110-
echo "### Build Output"
109+
{
110+
echo "### Build output"
111111
echo ""
112112
echo "- **Node version:** ${{ steps.setup.outputs.node_version }}"
113113
echo "- **NPM version:** ${{ steps.setup.outputs.npm_version }}"
114114
echo ""
115-
cat build-output.log
116-
} >> $GITHUB_STEP_SUMMARY
117-
115+
echo '```'
116+
# Strip ANSI colors and escape any triple backticks in the output
117+
sed 's/\x1b\[[0-9;]*m//g' build-output.log | sed 's/```/``\x60`/g'
118+
echo '```'
119+
echo ""
120+
} >> $GITHUB_STEP_SUMMARY
118121
- name: Upload static files as artifact
119122
id: deployment
120123
uses: actions/upload-pages-artifact@v3

0 commit comments

Comments
 (0)