summary and features #108
This file contains hidden or 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: summary and features | |
on: | |
schedule: | |
- cron: '*/5 * * * *' # Runs every 10 minutes | |
workflow_dispatch: # Allow manual triggers | |
inputs: | |
target_date: | |
description: 'Date to fetch (YYYY/MM/DD)' | |
required: false | |
jobs: | |
fetch_posts: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: vercel_backend # Checkout vercel_backend branch specifically | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Cache pip dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
- name: Fetch HN data and create issue | |
env: | |
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
OPENAI_BASE_URL: ${{ secrets.OPENAI_BASE_URL }} | |
GITHUB_REPOSITORY: ${{ vars.REPO }} | |
SUPABASE_URL: ${{ secrets.SUPABASE_URL }} | |
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }} | |
SUPADATA_API_KEY: ${{ secrets.SUPADATA_API_KEY }} | |
run: python fetch_hn_posts.py |