Skip to content

Commit

Permalink
Keep Devoping
Browse files Browse the repository at this point in the history
  • Loading branch information
luiscorreiaOps committed Dec 11, 2024
1 parent 3c84230 commit a25e5ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/motivational.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Conteudo

on:
schedule:
- cron: '0 0 * * *'
- cron: '0 0 * * *'
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -34,12 +34,12 @@ jobs:
}')
MOTIVATIONAL_TEXT=$(echo "$RESPONSE" | jq -r '.choices[0].message.content')
if [ -z "$MOTIVATIONAL_TEXT" ]; then
MOTIVATIONAL_TEXT="Well, it's not perfect, but it's definitely something!"
fi
ESCAPED_TEXT=$(echo "$MOTIVATIONAL_TEXT" | sed 's/[&/\"]/\\&/g')
ESCAPED_TEXT=$(echo "$ESCAPED_TEXT" | sed 's|/|\\/|g' | sed 's|"|\\"|g')
if grep -q '<div id="motivational-text">' index.html; then
sed -i "s|<div id=\"motivational-text\">.*</div>|<div id=\"motivational-text\">$ESCAPED_TEXT</div>|" index.html
Expand Down

0 comments on commit a25e5ee

Please sign in to comment.