Notion to GitHub Sync #201
This file contains hidden or 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 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 |