Skip to content

Commit a9f7b6a

Browse files
committed
ci: cleanup workflows
1 parent db2235e commit a9f7b6a

File tree

4 files changed

+30
-53
lines changed

4 files changed

+30
-53
lines changed

.github/workflows/publish-docs.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publish Docs
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: 20
18+
- uses: bahmutov/npm-install@v1
19+
20+
- name: Build docs
21+
run: yarn build:docs
22+
23+
- name: Push docs to remote repo
24+
uses: BetaHuhn/repo-file-sync-action@v1
25+
with:
26+
GH_PAT: ${{ secrets.BELLA_ACTION_TOKEN }}
27+
COMMIT_PREFIX: 'docs: '
28+
GIT_USERNAME: 'MagicBella'
29+
GIT_EMAIL: ${{ secrets.BELLA_EMAIL_ADDRESS }}

.github/workflows/release.yml

-16
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,3 @@ jobs:
4242
run: "npx -y brew-formula github @magicbell/cli magicbell/homebrew-tap --test-command 'magicbell logout' --test-output '/you are not logged in/i'"
4343
env:
4444
GITHUB_TOKEN: ${{ secrets.BELLA_ACTION_TOKEN }}
45-
46-
- name: Build docs
47-
if: steps.changesets.outputs.published == 'true'
48-
run: |
49-
yarn --cwd ./packages/codegen build # needed by scripts below
50-
yarn --cwd ./packages/project-client build:docs
51-
yarn --cwd ./packages/user-client build:docs
52-
53-
- name: Push docs to remote repo
54-
uses: BetaHuhn/repo-file-sync-action@v1
55-
if: steps.changesets.outputs.published == 'true'
56-
with:
57-
GH_PAT: ${{ secrets.BELLA_ACTION_TOKEN }}
58-
COMMIT_PREFIX: 'docs: '
59-
GIT_USERNAME: 'MagicBella'
60-
GIT_EMAIL: '${{ secrets.BELLA_EMAIL_ADDRESS }}'

.github/workflows/sync-docs.yml

-37
This file was deleted.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"build": "turbo run build",
2020
"build:example": "yarn --cwd example && yarn --cwd example build",
2121
"build:storybook": "build-storybook",
22+
"build:docs": "yarn --cwd packages/codegen build && yarn --cwd packages/project-client build:docs && yarn --cwd packages/user-client build:docs",
2223
"lint": "run-s lint:*",
2324
"lint:typescript": "tsc --noEmit",
2425
"lint:eslint": "eslint --fix .",

0 commit comments

Comments
 (0)