Articles CI #29112
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Articles CI | |
# Runs every 20 minutes and on manual trigger | |
on: | |
schedule: | |
# Run every 20 minutes | |
- cron: '*/20 * * * *' | |
workflow_dispatch: | |
env: | |
ADMIN_API_KEY: ${{ secrets.ADMIN_API_KEY }} | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
timeout-minutes: 1 | |
steps: | |
- run: curl -XPOST https://sentiment-guardian.vercel.app/api/articles -d '{"adminApiKey":"${{ secrets.ADMIN_API_KEY }}"}' | |
- run: curl -XPOST https://sentiment-guardian.vercel.app/api/sentiment -d '{"adminApiKey":"${{ secrets.ADMIN_API_KEY }}"}' | |
- run: echo "Done!" | |
- run: curl -XPOST https://sentiment-guardian.vercel.app/api/revalidate | |
- run: echo "Cache revalidated!" |