forked from percona/pmm-doc
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (53 loc) · 1.96 KB
/
build.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
name: Build PMM Docs (2.x)
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: percona-platform/checkout@v2
with:
fetch-depth: 0
- name: Setup Python
uses: percona-platform/setup-python@v2
with:
python-version: "3.x"
- name: Setup MkDocs
run: |
python -m pip install --upgrade pip
pip install wheel
test -f requirements.txt && pip install -r requirements.txt
- name: Configure git
env:
ROBOT_TOKEN: ${{ secrets.ROBOT_TOKEN }}
run: |
git config --global url."https://percona-platform-robot:${ROBOT_TOKEN}@github.com".insteadOf "https://github.com"
git config user.name "GitHub Action"
git config user.email "[email protected]"
git config user.password "${ROBOT_TOKEN}"
echo "GIT_USER=percona-platform-robot:${ROBOT_TOKEN}" >> $GITHUB_ENV
# Builds theme-less static web site in 'publish' branch for percona.com
- name: Build a theme-less site (2.x)
if: github.ref == 'refs/heads/main'
run: |
PATH=$PATH:_resources/bin mike deploy -F mkdocs-percona.yml 2.x -b publish -p
mike retitle -F mkdocs-percona.yml 2.x "PMM 2.x (LATEST)" -b publish -p
# Builds Material-themed static web site in 'preview' branch
- name: Build a themed site (2.x)
run: |
PATH=$PATH:_resources/bin mike deploy 2.x -b preview
mike set-default 2.x -b preview
mike retitle 2.x "PMM 2.x (LATEST)" -b preview
- name: Install NodeJS
uses: percona-platform/setup-node@v2
with:
node-version: "14"
- name: Spelling
run: |
# Ignore errors, just inspect results
npx markdown-spellcheck --report --en-us --ignore-acronyms --ignore-numbers "docs/**/*.md" || true