Run scrape_meta_imagine/scrape.py every hour #8675
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: Run scrape_meta_imagine/scrape.py every hour | |
on: | |
schedule: | |
# Cron to run every hour | |
- cron: "0 * * * *" | |
workflow_dispatch: # manual trigger | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.11" | |
cache: 'pip' | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
pwd | |
ls -la | |
- name: Run scrape_meta_imagine/scrape.py | |
env: # Set the secret as an input | |
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }} | |
HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
IS_CI: ${{ secrets.IS_CI }} | |
PYTHONPATH: "." | |
run: | | |
python scrape_meta_imagine/scrape.py |