Skip to content

Commit 93c94e9

Browse files
author
Tomás Ciccola
committed
add build flow
1 parent 37869ab commit 93c94e9

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/build.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Sync Notion Docs
2+
3+
on:
4+
workflow_dispatch
5+
6+
jobs:
7+
pull-docs:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
13+
- name: Setup Bun
14+
uses: oven-sh/setup-bun@v2
15+
16+
- name: Install dependencies
17+
run: bun i
18+
19+
- name: Notion To Markdown
20+
run: bun notionToMd
21+
22+
- name: Commit generated docs
23+
run: |
24+
git config user.name "github-actions[bot]"
25+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
26+
27+
# Stage specific paths (adjust to your generated files)
28+
git add docs i18n
29+
30+
# Commit if there are changes
31+
git diff --cached --quiet || git commit -m "chore: update docs from Notion"
32+
33+
# Push back to the repository
34+
git push
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
38+

0 commit comments

Comments
 (0)