forked from lensapp/lens
-
Notifications
You must be signed in to change notification settings - Fork 2
67 lines (59 loc) · 2.43 KB
/
mkdocs-manual.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Manual documentation update to sync a deployed Version with Master branch
on:
workflow_dispatch:
inputs:
version:
description: 'Version string to use (e.g."v0.0.1")'
required: true
jobs:
build:
name: Manual documentation update to sync a deployed Version with Master branch
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.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 Version from lens
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: '${{ github.event.inputs.version }}'
- 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: Checkout master branch from lens
uses: actions/checkout@v2
with:
path: 'master'
ref: 'master'
- name: Bring in latest mkdocs.yml from master
run: |
cp -p ./master/mkdocs.yml .
cp -p ./master/docs/stylesheets/extra.css ./docs/stylesheets/extra.css
rm -fr ./docs/clusters ./docs/contributing ./docs/faq ./docs/getting-started ./docs/helm ./docs/support ./docs/supporting
sed -i '/Protocol Handlers/d' ./mkdocs.yml
sed -i '/IPC/d' ./mkdocs.yml
sed -i 's#../../clusters/adding-clusters.md#https://docs.k8slens.dev/latest/clusters/adding-clusters/#g' ./docs/extensions/get-started/your-first-extension.md
sed -i 's#clusters/adding-clusters.md#https://docs.k8slens.dev/latest/clusters/adding-clusters/#g' ./docs/README.md
sed -i 's#../../contributing/README.md#https://docs.k8slens.dev/latest/contributing/#g' ./docs/extensions/guides/generator.md
- name: git config
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
- name: mkdocs deploy new release
run: |
mike deploy --push --force ${{ github.event.inputs.version }}