Skip to content

Commit 70c4a74

Browse files
committed
Fix GitHub Actions workflow secret check
Fixed issue with checking secrets in if condition Problem: - GitHub Actions doesn't allow checking secrets.ENTITY directly in if: - Error: "Unrecognized named-value: 'secrets'" Solution: - Move secret check to shell script within the step - Use [ -z "$SECRET" ] for shell-based checking - Script exits gracefully if secret not set Allows workflow to run even without ELEVENLABS_API_KEY
1 parent 9709359 commit 70c4a74

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/deploy-deno.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,16 @@ jobs:
114114
fi
115115
116116
- name: Deploy with ElevenLabs (if API key available)
117-
if: ${{ secrets.ELEVENLABS_API_KEY != '' }}
118117
run: |
119118
cd agent-memo
120119
120+
# Check if ELEVENLABS_API_KEY secret is set
121+
if [ -z "${{ secrets.ELEVENLABS_API_KEY }}" ]; then
122+
echo "⚠️ ELEVENLABS_API_KEY not set - skipping ElevenLabs deployment"
123+
echo "💡 To enable ElevenLabs, add ELEVENLABS_API_KEY to GitHub Secrets"
124+
exit 0
125+
fi
126+
121127
echo "🔊 Re-deploying with ElevenLabs support..."
122128
123129
if [ -n "$PROJECT_ID" ]; then

0 commit comments

Comments
 (0)