Skip to content

Commit a87ad2c

Browse files
committed
Fix workflow to use file-based prompt building
Avoids YAML parsing issues with multiline strings.
1 parent 667945e commit a87ad2c

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

.github/workflows/generate-site.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,24 @@ jobs:
3030
- name: Generate site with Claude API
3131
env:
3232
ANTHROPIC_API_KEY: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
33-
PROMPT_CONTENT: ${{ steps.prompt.outputs.content }}
3433
run: |
35-
# Build the JSON request with jq to handle escaping
36-
jq -n \
37-
--arg model "claude-sonnet-4-20250514" \
38-
--arg prompt "You are a web developer creating a GitHub Pages site.
34+
# Build the prompt
35+
cat > full_prompt.txt <<'EOF'
36+
You are a web developer creating a GitHub Pages site.
3937

4038
Here are the requirements:
4139

42-
$PROMPT_CONTENT
40+
EOF
41+
cat docs/site-prompt.md >> full_prompt.txt
42+
cat >> full_prompt.txt <<'EOF'
43+
44+
Please generate a complete, production-ready index.html file following all requirements. Output ONLY the HTML code, no explanations or markdown code blocks.
45+
EOF
4346

44-
Please generate a complete, production-ready index.html file following all requirements. Output ONLY the HTML code, no explanations or markdown code blocks." \
47+
# Build JSON request
48+
jq -n \
49+
--arg model "claude-sonnet-4-20250514" \
50+
--rawfile prompt full_prompt.txt \
4551
'{
4652
model: $model,
4753
max_tokens: 8192,

0 commit comments

Comments
 (0)