Skip to content

Product Hunt Scraper #2

Product Hunt Scraper

Product Hunt Scraper #2

Workflow file for this run

name: Product Hunt Scraper
on:
schedule:
- cron: "0 1 * * *" # Runs at 1 AM UTC daily
workflow_dispatch: # Allows manual trigger
permissions:
contents: write
jobs:
scrape:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
persist-credentials: true
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run scraper
env:
FIRECRAWL_API_KEY: ${{ secrets.FIRECRAWL_API_KEY }}
run: python scraper.py
- name: Commit and push if changes
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add *.json
git diff --quiet && git diff --staged --quiet || git commit -m "Update ProductHunt data [skip ci]"
git push