Notion Tasks Sync #1
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: Notion Tasks Sync | |
on: | |
schedule: | |
- cron: '0 23 * * *' | |
workflow_dispatch: | |
jobs: | |
sync_tasks: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Set up virtual environment and install dependencies | |
run: | | |
python3 -m venv .venv | |
source .venv/bin/activate | |
pip3 install --upgrade pip | |
pip3 install -r requirements.txt | |
- name: Debug environment variables | |
run: | | |
echo "NOTION_API_TOKEN is set: ${NOTION_API_TOKEN:+Yes}" | |
echo "NOTION_PAGE_ID is set: ${NOTION_PAGE_ID:+Yes}" | |
- name: Run main script | |
run: | |
python3 add_recurring_tasks.py | |
env: | |
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }} | |
DATABASE_ID: ${{ secrets.DATABASE_ID }} |