File tree Expand file tree Collapse file tree 2 files changed +46
-0
lines changed
Expand file tree Collapse file tree 2 files changed +46
-0
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 1+ name : Sync Notion Docs
2+
3+ on :
4+ workflow_call :
5+ workflow_dispatch :
6+ push :
7+ branches :
8+ - feat/buildFlow
9+
10+ jobs :
11+ pull-docs :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Checkout
15+ uses : actions/checkout@v4
16+
17+ - name : Setup Bun
18+ uses : oven-sh/setup-bun@v2
19+
20+ - name : Install dependencies
21+ run : bun i
22+
23+ - name : Notion To Markdown
24+ run : bun notionToMd
25+ env :
26+ NOTION_API_KEY : ${{ secrets.NOTION_API_KEY }}
27+ DATABASE_ID : ${{ secrets.DATABASE_ID }}
28+
29+
30+ - name : Commit generated docs
31+ run : |
32+ git config user.name "github-actions[bot]"
33+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
34+
35+ # Stage specific paths (adjust to your generated files)
36+ git add docs i18n
37+
38+ # Commit if there are changes
39+ git diff --cached --quiet || git commit -m "chore: update docs from Notion"
40+
41+ # Push back to the repository
42+ git push
43+
44+ env :
45+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
46+
You can’t perform that action at this time.
0 commit comments