Skip to content

Commit ad84ae0

Browse files
committed
process GHA output
1 parent 5bfaf44 commit ad84ae0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/deploy-alpha.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@ jobs:
8484
# Deploy using filter approach
8585
if npx netlify-cli@22.0.0 deploy --message "${DEPLOY_MESSAGE}" --dir dist/storybook/styleguide --filter @codecademy/styleguide --json > .deploy-output 2>&1; then
8686
DEPLOY_OUTPUT=$(cat .deploy-output)
87-
echo "deploy-output=$DEPLOY_OUTPUT" >> $GITHUB_OUTPUT
87+
# Escape the output for GitHub Actions
88+
DEPLOY_OUTPUT_ESCAPED=$(echo "$DEPLOY_OUTPUT" | sed 's/"/\\"/g' | tr '\n' ' ')
89+
echo "deploy-output<<EOF" >> $GITHUB_OUTPUT
90+
echo "$DEPLOY_OUTPUT" >> $GITHUB_OUTPUT
91+
echo "EOF" >> $GITHUB_OUTPUT
8892
else
8993
echo "Deploy failed. Output:"
9094
cat .deploy-output

0 commit comments

Comments
 (0)