From 265fce4153ef44a6c43b3de624f03a7115b4fac9 Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 29 Oct 2025 18:03:49 +0800 Subject: [PATCH] feat: add workflow --- .github/workflows/news-bot.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/news-bot.yml diff --git a/.github/workflows/news-bot.yml b/.github/workflows/news-bot.yml new file mode 100644 index 000000000..3e4c39775 --- /dev/null +++ b/.github/workflows/news-bot.yml @@ -0,0 +1,30 @@ +name: Daily News Bot + +on: + schedule: + - cron: "0 23 * * 0-4" + workflow_dispatch: + +jobs: + run-daily-news-bot: + environment: Bots + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "20" + cache: "npm" + + - name: Install dependencies + run: npm install --no-save @openai/agents tsx typescript + + - name: Run daily news bot + env: + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + OPENISLE_TOKEN: ${{ secrets.OPENISLE_TOKEN }} + APIFY_API_TOKEN: ${{ secrets.APIFY_API_TOKEN }} + run: npx tsx bots/instance/daily_news_bot.ts