Skip to content

Commit

Permalink
chore: add workflow to sync docs
Browse files Browse the repository at this point in the history
  • Loading branch information
smeijer committed Feb 11, 2025
1 parent dfbc959 commit 9c4013e
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/sync-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Sync Docs
on:
workflow_dispatch:

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.BELLA_ACTION_TOKEN }}

- name: Configure Git
run: |
git config --global user.email '${{ secrets.BELLA_EMAIL_ADDRESS }}'
git config --global user.name 'MagicBella'
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: bahmutov/npm-install@v1

- name: Build docs
run: |
yarn --cwd ./packages/codegen build # needed by scripts below
yarn --cwd ./packages/project-client build:docs
yarn --cwd ./packages/user-client build:docs
- name: Push docs to remote repo
uses: BetaHuhn/repo-file-sync-action@v1
with:
GH_PAT: ${{ secrets.BELLA_ACTION_TOKEN }}
COMMIT_PREFIX: 'docs: '
GIT_USERNAME: 'MagicBella'
GIT_EMAIL: '${{ secrets.BELLA_EMAIL_ADDRESS }}'

0 comments on commit 9c4013e

Please sign in to comment.