Skip to content

Sync Notion to GitHub Blog #2364

Sync Notion to GitHub Blog

Sync Notion to GitHub Blog #2364

Workflow file for this run

name: Sync Notion to GitHub Blog
on:
workflow_dispatch:
schedule:
- cron: "0 * * * *"
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip install notion-client==2.2.1
pip install markdownify
- name: Run export script
env:
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}
NOTION_DATABASE_ID: ${{ secrets.NOTION_DATABASE_ID }}
run: python notion_export.py
- name: Commit and Push
run: |
git config --global user.email "action@github.com"
git config --global user.name "GitHub Action"
git add .
git commit -m "Notion → GitHub Sync" || echo "No changes"
git push