Skip to content

env accessible to bun notionToMd #5

env accessible to bun notionToMd

env accessible to bun notionToMd #5

Workflow file for this run

name: Sync Notion Docs
on:
workflow_dispatch:
push:
branches:
- feat/buildFlow
jobs:
pull-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun i
- name: Notion To Markdown
run: bun notionToMd
env:
NOTION_API_KEY: ${{ secrets.NOTION_API_KEY }}
DATABASE_ID: ${{ secrets.DATABASE_ID }}
- name: Commit generated docs
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
# Stage specific paths (adjust to your generated files)
git add docs i18n
# Commit if there are changes
git diff --cached --quiet || git commit -m "chore: update docs from Notion"
# Push back to the repository
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}