Skip to content

Commit d42eed0

Browse files
Merge pull request #80 from Palbahngmiyine/master
Update Github Actions Worflow
2 parents 822a81d + b96c5b2 commit d42eed0

2 files changed

Lines changed: 29 additions & 16 deletions

File tree

.github/workflows/build-docs.yaml

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,36 @@
11
name: Build SDK API References Documents
22

3-
on:
4-
push:
5-
branches: [ master ]
3+
"on":
4+
release:
5+
types: [ published ]
6+
workflow_dispatch:
67

78
jobs:
89
build-docs:
910
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
1013
steps:
1114
- name: Checkout
12-
uses: actions/checkout@v2
13-
- name: Build
14-
run: |
15-
pnpm install
16-
pnpm run docs
17-
- name: Commit and push docs
18-
working-directory: ./
19-
run: |
20-
git config --global user.email "robot@solapi.com"
21-
git config --global user.name "SOLAPI Robot"
22-
git add ./docs
23-
git commit -m "Update SDK API References"
24-
git push
15+
uses: actions/checkout@v4
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 18
20+
cache: pnpm
21+
cache-dependency-path: pnpm-lock.yaml
22+
- name: Setup pnpm
23+
uses: pnpm/action-setup@v4
24+
with:
25+
version: 10.15.1
26+
- name: Install dependencies
27+
run: pnpm install --frozen-lockfile
28+
- name: Build docs
29+
run: pnpm run docs
30+
- name: Upload docs artifact
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: solapi-nodejs-docs-${{ github.run_number }}
34+
path: docs
35+
if-no-files-found: error
36+
retention-days: 14

biome.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
"!examples/**/*",
8080
"!debug/**/*",
8181
"!docs/**/*",
82+
"!**/.github/**",
8283
"!**/.yarn/**",
8384
"!**/.pnp.*",
8485
"!.yarnrc.yml",

0 commit comments

Comments
 (0)