Skip to content

Commit

Permalink
build(intial): initial build
Browse files Browse the repository at this point in the history
  • Loading branch information
bmarshall511 committed Dec 9, 2023
1 parent b3b60d4 commit f6a6a43
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build Hook Docs

on:
push:
branches:
- master

jobs:
hookdocs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
- name: Use Node.js 10
uses: actions/setup-node@v1
with:
node-version: '10.x'
- name: npm install, and build docs
run: |
npm install
npm run build:docs
env:
CI: true
- name: Deploy to GH Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: './docs'
26 changes: 26 additions & 0 deletions hookdoc-conf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"opts": {
"destination": "hookdocs",
"template": "node_modules/wp-hookdoc/template",
"recurse": true,
"readme": "./.github/hookdoc-tmpl/README.md"
},
"source": {
"include": [ "./" ],
"includePattern": ".+\\.(php)?$"
},
"plugins": [
"node_modules/wp-hookdoc/plugin",
"plugins/markdown"
],
"templates": {
"default": {
"layoutFile": "./.github/hookdoc-tmpl/layout.tmpl",
"staticFiles": {
"include": [
"./.github/hookdoc-tmpl/static"
]
}
}
}
}
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"start": "npm run watch",
"watch": "10up-toolkit watch --port=5000",
"build": "10up-toolkit build",
"build:docs": "rm -rf hookdocs/ && jsdoc -c hookdoc-conf.json",
"format-js": "10up-toolkit format-js",
"lint-js": "10up-toolkit lint-js",
"lint-style": "10up-toolkit lint-style",
Expand All @@ -18,7 +19,9 @@
"devDependencies": {
"@commitlint/config-conventional": "^18.4.3",
"10up-toolkit": "^5.2.2",
"husky": "^8.0.3"
"husky": "^8.0.3",
"jsdoc": "~3.6.3",
"wp-hookdoc": "^0.2.0"
},
"dependencies": {
"modern-normalize": "^2.0.0"
Expand Down

0 comments on commit f6a6a43

Please sign in to comment.