Skip to content

Commit 6a6718b

Browse files
committed
add docs workflow
1 parent b4ecc6c commit 6a6718b

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

.github/workflows/docs.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: actions/setup-node@v1
12+
with:
13+
node-version: '14'
14+
- run: "npm install"
15+
- run: "npm run docs"
16+
- uses: JamesIves/[email protected]
17+
with:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
BRANCH: gh-pages
20+
FOLDER: docs-out

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
node_modules/**
22
package-lock.json
3-
docs.json
43
browser.js
54
test/auth.js
5+
docs-out

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
},
2424
"scripts": {
2525
"lint": "eslint src test --ext=js",
26-
"docs": "docgen --source src --output docs.json --jsdoc jsdoc.json --custom docgen.json",
26+
"docs": "mkdir -p docs-out && docgen --source src --output docs-out/master.json --jsdoc jsdoc.json --custom docgen.json",
2727
"example": "electron example/main.js",
2828
"build:browser": "webpack-cli",
2929
"prepublishOnly": "npm run lint && npm run build:browser"

0 commit comments

Comments
 (0)