Skip to content

Notion to GitHub Sync #200

Notion to GitHub Sync

Notion to GitHub Sync #200

Workflow file for this run

name: Notion to GitHub Sync
on:
schedule:
- cron: '0 * * * *' # Runs at minute 0 of every hour
workflow_dispatch: # Allows you to trigger the run manually
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6 # BUMPED to v6 for Node 24 support
- name: Set up Python
uses: actions/setup-python@v6 # BUMPED to v6 for Node 24 support
with:
python-version: '3.9'
- name: Install dependencies
run: pip install requests
- name: Run sync script
env:
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}
NOTION_DATABASE_ID: ${{ secrets.NOTION_DATABASE_ID }}
TZ: 'America/New_York'
run: python sync_notion.py
- name: Commit and push changes
run: |
git config --global user.name "notion-bot"
git config --global user.email "[email protected]"
git add .
git commit -m "Auto-sync from Notion [skip ci]" || exit 0
git push