fix: enable Telegram channel in deploy workflow when token is provided
The deployment was setting the bot token but not enabling the Telegram channel, causing the bot to never initialize even with valid credentials. https://claude.ai/code/session_019vXaqxGmkdCjM8m3jp6rYj
This commit is contained in:
parent
c3ec7ebc25
commit
bf4959e913
1 changed files with 6 additions and 1 deletions
7
.github/workflows/deploy-hostinger.yml
vendored
7
.github/workflows/deploy-hostinger.yml
vendored
|
|
@ -82,11 +82,16 @@ jobs:
|
|||
# Update .env with secrets (keep existing values, only override if provided)
|
||||
ENV_FILE="/opt/picoclaw/config/.env"
|
||||
|
||||
# Telegram Bot Token
|
||||
# Telegram Bot Token + Enable
|
||||
if [ -n "${{ secrets.PICOCLAW_TELEGRAM_BOT_TOKEN }}" ]; then
|
||||
grep -q "PICOCLAW_CHANNELS_TELEGRAM_TOKEN" "$ENV_FILE" && \
|
||||
sed -i "s|^PICOCLAW_CHANNELS_TELEGRAM_TOKEN=.*|PICOCLAW_CHANNELS_TELEGRAM_TOKEN=${{ secrets.PICOCLAW_TELEGRAM_BOT_TOKEN }}|" "$ENV_FILE" || \
|
||||
echo "PICOCLAW_CHANNELS_TELEGRAM_TOKEN=${{ secrets.PICOCLAW_TELEGRAM_BOT_TOKEN }}" >> "$ENV_FILE"
|
||||
|
||||
# Enable Telegram channel when token is provided
|
||||
grep -q "PICOCLAW_CHANNELS_TELEGRAM_ENABLED" "$ENV_FILE" && \
|
||||
sed -i "s|^PICOCLAW_CHANNELS_TELEGRAM_ENABLED=.*|PICOCLAW_CHANNELS_TELEGRAM_ENABLED=true|" "$ENV_FILE" || \
|
||||
echo "PICOCLAW_CHANNELS_TELEGRAM_ENABLED=true" >> "$ENV_FILE"
|
||||
fi
|
||||
|
||||
# Anthropic API Key
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue