Skip to content

Commit 4b2cbea

Browse files
Copilotcommjoen
andcommitted
Fix GitHub Actions JavaScript syntax error in preview workflow
Co-authored-by: commjoen <[email protected]>
1 parent fe2bc35 commit 4b2cbea

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/preview.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
---
1+
--- # yamllint disable rule:line-length
22
name: "Preview Deployment"
33

44
on:
@@ -117,6 +117,7 @@ jobs:
117117
- name: Create deployment instructions
118118
id: instructions
119119
run: |
120+
# yamllint disable rule:line-length
120121
cat > instructions.md << 'EOF'
121122
## 🚀 Preview Deployment Ready!
122123
@@ -191,13 +192,16 @@ jobs:
191192
192193
*This preview was automatically generated for PR #${{ github.event.number }}*
193194
EOF
195+
# yamllint enable rule:line-length
194196
195197
echo "content<<EOF" >> $GITHUB_OUTPUT
196198
cat instructions.md >> $GITHUB_OUTPUT
197199
echo "EOF" >> $GITHUB_OUTPUT
198200
199201
- name: Comment on PR
200202
uses: actions/github-script@v7
203+
env:
204+
INSTRUCTIONS_CONTENT: ${{ steps.instructions.outputs.content }}
201205
with:
202206
script: |
203207
const { owner, repo } = context.repo;
@@ -215,7 +219,7 @@ jobs:
215219
comment.body.includes('🚀 Preview Deployment Ready!')
216220
);
217221
218-
const body = `${{ steps.instructions.outputs.content }}`;
222+
const body = process.env.INSTRUCTIONS_CONTENT;
219223
220224
if (existingComment) {
221225
// Update existing comment
@@ -243,6 +247,7 @@ jobs:
243247
steps:
244248
- name: Create main branch notification
245249
run: |
250+
# yamllint disable rule:line-length
246251
echo "## 🚀 Main Branch Preview Images Updated!"
247252
echo ""
248253
echo "New preview images have been built for the main branch:"
@@ -251,3 +256,4 @@ jobs:
251256
echo "- **Cleaner**: \`${{ env.IMAGE_PREFIX }}/cleaner:${{ needs.set-tag.outputs.tag }}\`"
252257
echo ""
253258
echo "These can be used for testing the latest main branch changes."
259+
# yamllint enable rule:line-length

0 commit comments

Comments
 (0)