Notion → Blog Publish #390
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 → Blog Publish | |
| on: | |
| schedule: | |
| - cron: '*/30 * * * *' # 30분마다 실행 | |
| workflow_dispatch: {} # 수동 실행 가능 | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install dependencies | |
| run: pip install httpx boto3 | |
| - name: Run publish script | |
| env: | |
| NOTION_API_KEY: ${{ secrets.NOTION_API_KEY }} | |
| # 3 Hub DB IDs (Documents / Projects / Seminar & Paper) | |
| NOTION_DB_DOCUMENTS: ${{ secrets.NOTION_DB_DOCUMENTS }} | |
| NOTION_DB_PROJECTS: ${{ secrets.NOTION_DB_PROJECTS }} | |
| NOTION_DB_SEMINAR: ${{ secrets.NOTION_DB_SEMINAR }} | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| AWS_REGION: ${{ secrets.AWS_REGION }} | |
| LLM_MODEL_ID: ${{ secrets.LLM_MODEL_ID }} | |
| # 작성자별 Fine-grained PAT (fallback: GH_PAT_SUNG) | |
| GH_PAT_HANK: ${{ secrets.GH_PAT_HANK }} | |
| GH_PAT_SUNG: ${{ secrets.GH_PAT_SUNG }} | |
| GH_PAT_JAEHUN: ${{ secrets.GH_PAT_JAEHUN }} | |
| run: python scripts/notion-publish.py |