Skip to content

Articles CI

Articles CI #29066

Workflow file for this run

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!"