Skip to content

Commit 9c4013e

Browse files
committed
chore: add workflow to sync docs
1 parent dfbc959 commit 9c4013e

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/sync-docs.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Sync Docs
2+
on:
3+
workflow_dispatch:
4+
5+
concurrency: ${{ github.workflow }}-${{ github.ref }}
6+
7+
jobs:
8+
sync:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
token: ${{ secrets.BELLA_ACTION_TOKEN }}
14+
15+
- name: Configure Git
16+
run: |
17+
git config --global user.email '${{ secrets.BELLA_EMAIL_ADDRESS }}'
18+
git config --global user.name 'MagicBella'
19+
20+
- uses: actions/setup-node@v4
21+
with:
22+
node-version: 20
23+
- uses: bahmutov/npm-install@v1
24+
25+
- name: Build docs
26+
run: |
27+
yarn --cwd ./packages/codegen build # needed by scripts below
28+
yarn --cwd ./packages/project-client build:docs
29+
yarn --cwd ./packages/user-client build:docs
30+
31+
- name: Push docs to remote repo
32+
uses: BetaHuhn/repo-file-sync-action@v1
33+
with:
34+
GH_PAT: ${{ secrets.BELLA_ACTION_TOKEN }}
35+
COMMIT_PREFIX: 'docs: '
36+
GIT_USERNAME: 'MagicBella'
37+
GIT_EMAIL: '${{ secrets.BELLA_EMAIL_ADDRESS }}'

0 commit comments

Comments
 (0)