-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (55 loc) · 1.42 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
on:
[create, workflow_dispatch]
permissions:
id-token: write
actions: write
checks: write
contents: write
deployments: write
discussions: write
issues: write
packages: write
pages: write
pull-requests: write
repository-projects: write
security-events: write
statuses: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '16.15.0'
- name: npm install, build and test
run: |
npm install
npm run build
- name: documents
run: npx api-extractor run
continue-on-error: true
- run: npx api-documenter markdown -i ./temp
- uses: actions/checkout@v3
with:
repository: 'heipiao233/dmclc'
path: 'docs'
ref: 'docs'
- run: |
cp ./markdown/* ./docs/ -r
tar cvzf locales.tar.gz locales
cp ./locales.tar.gz ./docs/
cd ./docs/
git config --global user.email "[email protected]"
git config --global user.name "bot"
git add .
git commit -m "auto document and locale"
git push
continue-on-error: true
- name: publish
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
continue-on-error: true