Skip to content

Commit

Permalink
Update gh_pages workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Feb 1, 2021
1 parent 14310dd commit efcdac7
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 25 deletions.
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

open_collective: yeoman
23 changes: 9 additions & 14 deletions .github/workflows/gh_pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,33 @@ on:
- docs
release:
types: [published]
workflow_dispatch:

jobs:
build:
name: Update api docs
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- run: npm install -g jsdoc prettier
- uses: actions/checkout@v2
with:
path: source
- uses: actions/checkout@v2
with:
ref: gh-pages
path: out
path: yeoman-environment-doc
- name: Update jsdoc
working-directory: source
run: |
cd source
npm ci
npm install tui-jsdoc-template --no-package-lock
jsdoc -c jsdoc.json -d ../out
- name: Run prettier
run: |
cd out
sed -i -e 's:^[[:space:]]*<!--[[:space:]]*$::g' -e 's:^[[:space:]]*-->[[:space:]]*$::g' global.html
prettier . --write
npm install tui-jsdoc-template prettier@latest --no-package-lock
npm run doc
sed -i -e 's:^[[:space:]]*<!--[[:space:]]*$::g' -e 's:^[[:space:]]*-->[[:space:]]*$::g' ../yeoman-generator-doc/global.html
npm run doc:prettier
- name: Create commit
working-directory: yeoman-environment-doc
if: always()
run: |
cd out
git add .
git config --local user.email ""
git config --local user.name "Github Actions"
Expand All @@ -46,14 +43,12 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'Update api for ${{github.event.release.name}}'
committer: ""
author: Github Actions <[email protected]>
title: 'Update api for ${{github.event.release.name}}'
body: |
Update api docs
labels: automated pr
branch: gh-pages-master
path: out
path: yeoman-environment-doc
- name: Check outputs
run: |
echo "Pull Request Number - ${{ env.PULL_REQUEST_NUMBER }}"
Expand Down
5 changes: 5 additions & 0 deletions .prettierignore-doc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
.git
**/scripts/**
**/styles/**

20 changes: 10 additions & 10 deletions jsdoc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
{
"source": {
"include": ["readme.md", "lib"],
"includePattern": ".+\\.js(doc)?$"
},
"opts": {
"recurse": true,
"destination": "../yeoman-environment-doc",
"template": "node_modules/tui-jsdoc-template",
"package": "package.json"
},
"templates": {
"logo": {
"url": "https://raw.githubusercontent.com/yeoman/yeoman.github.io/source/app/assets/img/logo.png",
Expand All @@ -11,15 +21,5 @@
"includeDate": false
}
},
"source": {
"include": ["readme.md", "lib"],
"includePattern": ".+\\.js(doc)?$"
},
"opts": {
"recurse": true,
"destination": "../out/",
"template": "node_modules/tui-jsdoc-template",
"package": "package.json"
},
"plugins": ["plugins/markdown"]
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"test-namespace": "nyc mocha test/namespace.js test/flags.js",
"test-repository": "nyc mocha test/repository.js",
"test-resolver": "nyc mocha test/resolver.js",
"doc": "jsdoc -c ./jsdoc.json ./readme.md",
"doc": "jsdoc -c jsdoc.json -d ../yeoman-environment-doc",
"doc:prettier": "prettier ../yeoman-environment-doc --write --ignore-path .prettierignore-doc",
"coverage": "nyc report --reporter=text-lcov | coveralls"
},
"dependencies": {
Expand Down

0 comments on commit efcdac7

Please sign in to comment.