mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
add step to verify docs on area/documentation PRs (#1528)
* add step to verify docs on area/documentation PRs * use GH actions to run the verification * add check if label is set to area/documentation * fix broken links in docs with WIP files * add generating API docs before verifying Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
b3fd2232b5
commit
686cb122a3
47
.github/workflows/check-docs.yml
vendored
Normal file
47
.github/workflows/check-docs.yml
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
name: Publish docs via GitHub Pages
|
||||
on:
|
||||
- pull_request
|
||||
jobs:
|
||||
build:
|
||||
name: Check Docs
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.label.name != 'area/documentation'
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x]
|
||||
steps:
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install git+https://${{ secrets.GH_TOKEN }}@github.com/lensapp/mkdocs-material-insiders.git
|
||||
pip install mike
|
||||
|
||||
|
||||
- name: Checkout Release from lens
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: git config
|
||||
run: |
|
||||
git config --local user.email "action@github.com"
|
||||
git config --local user.name "GitHub Action"
|
||||
|
||||
- name: Using Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Generate Extensions API Reference using typedocs
|
||||
run: |
|
||||
yarn install
|
||||
yarn typedocs-extensions-api
|
||||
|
||||
- name: Verify that the markdown is valid
|
||||
run: |
|
||||
yarn run verify-docs
|
||||
5
.github/workflows/main.yml
vendored
5
.github/workflows/main.yml
vendored
@ -46,6 +46,10 @@ jobs:
|
||||
yarn install
|
||||
yarn typedocs-extensions-api
|
||||
|
||||
- name: Verify that the markdown is valid
|
||||
run: |
|
||||
yarn run verify-docs
|
||||
|
||||
- name: mkdocs deploy master
|
||||
if: contains(github.ref, 'refs/heads/master')
|
||||
run: |
|
||||
@ -61,4 +65,3 @@ jobs:
|
||||
run: |
|
||||
mike deploy --push --update-aliases ${{ steps.get_version.outputs.VERSION }} latest
|
||||
mike set-default --push ${{ steps.get_version.outputs.VERSION }}
|
||||
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -16,3 +16,4 @@ types/extension-api.d.ts
|
||||
types/extension-renderer-api.d.ts
|
||||
extensions/*/dist
|
||||
docs/extensions/api
|
||||
site/
|
||||
|
||||
@ -14,7 +14,7 @@ Here are some examples of what you can achieve with the Extension API:
|
||||
|
||||
* Add custom components & views in the UI - Extending the Lens Workbench
|
||||
|
||||
For an overview of the Lens Extension API, refer to the [Common Capabilities](capabilities/common-capabilities.md) page. [Extension Guides Overview](guides/overview.md) also includes a list of code samples and guides that illustrate various ways of using the Lens Extension API.
|
||||
For an overview of the Lens Extension API, refer to the [Common Capabilities](capabilities/common-capabilities.md) page. [Extension Guides Overview](guides/README.md) also includes a list of code samples and guides that illustrate various ways of using the Lens Extension API.
|
||||
|
||||
## How to Build Extensions
|
||||
|
||||
|
||||
3
docs/extensions/guides/anatomy.md
Normal file
3
docs/extensions/guides/anatomy.md
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
WIP
|
||||
---
|
||||
3
docs/extensions/guides/components.md
Normal file
3
docs/extensions/guides/components.md
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
WIP
|
||||
---
|
||||
3
docs/extensions/guides/kube-object-list-layout.md
Normal file
3
docs/extensions/guides/kube-object-list-layout.md
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
WIP
|
||||
---
|
||||
3
docs/extensions/guides/stores.md
Normal file
3
docs/extensions/guides/stores.md
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
WIP
|
||||
---
|
||||
@ -40,6 +40,7 @@
|
||||
"lint": "yarn run eslint $@ --ext js,ts,tsx --max-warnings=0 src/ integration/ __mocks__/ build/ extensions/",
|
||||
"lint:fix": "yarn run lint --fix",
|
||||
"mkdocs-serve-local": "docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -it -p 8000:8000 -v ${PWD}:/docs mkdocs-serve-local:latest",
|
||||
"verify-docs": "docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -v ${PWD}:/docs mkdocs-serve-local:latest build --strict",
|
||||
"typedocs-extensions-api": "yarn run typedoc --ignoreCompilerErrors --readme docs/extensions/typedoc-readme.md.tpl --name @k8slens/extensions --out docs/extensions/api --mode library --excludePrivate --hideBreadcrumbs --includes src/ src/extensions/extension-api.ts"
|
||||
},
|
||||
"config": {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user