Skip to content

Commit efcdac7

Browse files
committed
Update gh_pages workflow
1 parent 14310dd commit efcdac7

File tree

5 files changed

+29
-25
lines changed

5 files changed

+29
-25
lines changed

.github/FUNDING.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These are supported funding model platforms
2+
3+
open_collective: yeoman

.github/workflows/gh_pages.yml

+9-14
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,33 @@ on:
55
- docs
66
release:
77
types: [published]
8+
workflow_dispatch:
89

910
jobs:
1011
build:
1112
name: Update api docs
1213
runs-on: ubuntu-latest
1314
steps:
1415
- uses: actions/[email protected]
15-
- run: npm install -g jsdoc prettier
1616
- uses: actions/checkout@v2
1717
with:
1818
path: source
1919
- uses: actions/checkout@v2
2020
with:
2121
ref: gh-pages
22-
path: out
22+
path: yeoman-environment-doc
2323
- name: Update jsdoc
24+
working-directory: source
2425
run: |
25-
cd source
2626
npm ci
27-
npm install tui-jsdoc-template --no-package-lock
28-
jsdoc -c jsdoc.json -d ../out
29-
- name: Run prettier
30-
run: |
31-
cd out
32-
sed -i -e 's:^[[:space:]]*<!--[[:space:]]*$::g' -e 's:^[[:space:]]*-->[[:space:]]*$::g' global.html
33-
prettier . --write
27+
npm install tui-jsdoc-template prettier@latest --no-package-lock
28+
npm run doc
29+
sed -i -e 's:^[[:space:]]*<!--[[:space:]]*$::g' -e 's:^[[:space:]]*-->[[:space:]]*$::g' ../yeoman-generator-doc/global.html
30+
npm run doc:prettier
3431
- name: Create commit
32+
working-directory: yeoman-environment-doc
3533
if: always()
3634
run: |
37-
cd out
3835
git add .
3936
git config --local user.email ""
4037
git config --local user.name "Github Actions"
@@ -46,14 +43,12 @@ jobs:
4643
with:
4744
token: ${{ secrets.GITHUB_TOKEN }}
4845
commit-message: 'Update api for ${{github.event.release.name}}'
49-
committer: ""
50-
author: Github Actions <[email protected]>
5146
title: 'Update api for ${{github.event.release.name}}'
5247
body: |
5348
Update api docs
5449
labels: automated pr
5550
branch: gh-pages-master
56-
path: out
51+
path: yeoman-environment-doc
5752
- name: Check outputs
5853
run: |
5954
echo "Pull Request Number - ${{ env.PULL_REQUEST_NUMBER }}"

.prettierignore-doc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
.git
3+
**/scripts/**
4+
**/styles/**
5+

jsdoc.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
{
2+
"source": {
3+
"include": ["readme.md", "lib"],
4+
"includePattern": ".+\\.js(doc)?$"
5+
},
6+
"opts": {
7+
"recurse": true,
8+
"destination": "../yeoman-environment-doc",
9+
"template": "node_modules/tui-jsdoc-template",
10+
"package": "package.json"
11+
},
212
"templates": {
313
"logo": {
414
"url": "https://raw.githubusercontent.com/yeoman/yeoman.github.io/source/app/assets/img/logo.png",
@@ -11,15 +21,5 @@
1121
"includeDate": false
1222
}
1323
},
14-
"source": {
15-
"include": ["readme.md", "lib"],
16-
"includePattern": ".+\\.js(doc)?$"
17-
},
18-
"opts": {
19-
"recurse": true,
20-
"destination": "../out/",
21-
"template": "node_modules/tui-jsdoc-template",
22-
"package": "package.json"
23-
},
2424
"plugins": ["plugins/markdown"]
2525
}

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
"test-namespace": "nyc mocha test/namespace.js test/flags.js",
3737
"test-repository": "nyc mocha test/repository.js",
3838
"test-resolver": "nyc mocha test/resolver.js",
39-
"doc": "jsdoc -c ./jsdoc.json ./readme.md",
39+
"doc": "jsdoc -c jsdoc.json -d ../yeoman-environment-doc",
40+
"doc:prettier": "prettier ../yeoman-environment-doc --write --ignore-path .prettierignore-doc",
4041
"coverage": "nyc report --reporter=text-lcov | coveralls"
4142
},
4243
"dependencies": {

0 commit comments

Comments
 (0)