chore: Notion 동기화 2026-06-30 00:00 #149
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: MD to Notion Sync | |
| on: | |
| push: | |
| branches: [main, develop] | |
| paths: | |
| - 'docs/**/*.md' | |
| permissions: | |
| contents: write | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| if: | | |
| github.event.head_commit.author.name != 'server-cron' && | |
| !contains(github.event.head_commit.message, '[skip-notion]') | |
| env: | |
| NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }} | |
| NOTION_ABOUT: ${{ secrets.NOTION_ABOUT }} | |
| NOTION_ARCHITECTURE: ${{ secrets.NOTION_ARCHITECTURE }} | |
| NOTION_CONTRIBUTE: ${{ secrets.NOTION_CONTRIBUTE }} | |
| NOTION_DOCS: ${{ secrets.NOTION_DOCS }} | |
| NOTION_INSTALL: ${{ secrets.NOTION_INSTALL }} | |
| NOTION_POC: ${{ secrets.NOTION_POC }} | |
| NOTION_RELEASE: ${{ secrets.NOTION_RELEASE }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| cache: pip | |
| - name: Install dependencies | |
| run: pip install requests | |
| - name: Sync docs to Notion | |
| run: python3 scripts/md_to_notion.py | |
| env: | |
| GIT_BEFORE: ${{ github.event.before }} | |
| GIT_AFTER: ${{ github.sha }} | |
| - name: Commit updated sync maps | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add 'docs/**/.notion-sync.json' || git add docs/ | |
| if ! git diff --staged --quiet; then | |
| git commit -m "chore: .notion-sync.json 업데이트 (md→Notion 동기화)" | |
| git push | |
| fi |