Skip to content

Commit 6b764e1

Browse files
committed
publish.yml auto docs upload added
1 parent 82ad530 commit 6b764e1

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/publish.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,41 @@ jobs:
6464
run: npm publish
6565
env:
6666
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
67+
68+
publish-docs:
69+
name: Docs publish
70+
runs-on: self-hosted
71+
steps:
72+
- name: Checkout code
73+
uses: actions/checkout@v4
74+
with:
75+
ref: master
76+
77+
- name: Set up Node.js
78+
uses: actions/setup-node@v3
79+
with:
80+
node-version: 18
81+
82+
- name: Install dependencies
83+
run: npm ci
84+
85+
- name: Generate docs
86+
run: npm run doc
87+
88+
- name: Checkout docs branch
89+
uses: actions/checkout@v4
90+
with:
91+
ref: docs
92+
clean: false
93+
94+
- name: Copy docs to root
95+
run: |
96+
cp -r docs/* .
97+
98+
- name: Commit and push docs
99+
run: |
100+
git config user.name "GitHub Actions"
101+
git config user.email "actions@github.com"
102+
git add .
103+
git commit -m "Update documentation"
104+
git push

0 commit comments

Comments
 (0)