-
Notifications
You must be signed in to change notification settings - Fork 3
33 lines (31 loc) · 1.01 KB
/
docs.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
name: Publish docs via GitHub Pages
on:
push:
branches:
- main
paths:
- "docs/**"
permissions:
contents: write
jobs:
build:
name: Deploy docs
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.9.x" # Version range or exact version of a Python version to use, using SemVer's version range syntax
cache: pip
cache-dependency-path: "docs/requirements.txt"
- run: pip install -r docs/requirements.txt
- name: Config
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git checkout "${GITHUB_REF:11}"
git pull
- name: Deploy
run: mkdocs gh-deploy --config-file docs/mkdocs.yml