Skip to content

Commit 1152694

Browse files
author
Tomás Ciccola
committed
added correct flows
1 parent 1d89a05 commit 1152694

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed
File renamed without changes.

.github/workflows/sync-docs.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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+

0 commit comments

Comments
 (0)