-
Notifications
You must be signed in to change notification settings - Fork 8
48 lines (48 loc) · 1.08 KB
/
docs-publish.yaml
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
name: docs-publish
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- develop
release:
types:
- published
permissions:
contents: write
jobs:
pre-commit:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- uses: pre-commit/[email protected]
with:
extra_args: --hook-stage manual --all-files
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.x
- name: "Upgrade pip"
run: pip install --upgrade pip
- name: "Install requirements"
run: pip install -r site/requirements.txt
- name: Build and Deploy
working-directory: ./site
run: |
mkdocs build
mkdocs gh-deploy --force
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true