Create Twitter collections cron job #29229
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: Create Twitter collections cron job | |
on: | |
schedule: | |
- cron: "*/5 * * * *" # Run it every 5 minutes | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo content | |
uses: actions/checkout@v2 | |
- name: Setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
- name: Install python packages | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Execute script | |
env: | |
COLLECTION_URL_PREFIX: ${{ secrets.COLLECTION_URL_PREFIX }} | |
NOTION_API_TOKEN: ${{ secrets.NOTION_API_TOKEN }} | |
NOTION_DATABASE_ID: ${{ secrets.NOTION_DATABASE_ID }} | |
run: python src/create_collections.py |