-
Notifications
You must be signed in to change notification settings - Fork 114
38 lines (31 loc) · 894 Bytes
/
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
34
35
36
37
38
name: Deploy docs
on:
push:
branches:
- v*
- master
permissions:
contents: write
jobs:
docs:
name: Deploy docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: pip
cache-dependency-path: requirements_dev.txt
- name: Install dependencies
run: pip install -r requirements_dev.txt
- name: Prepare environment
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
echo "SOURCE_DATE_EPOCH=$(git log -1 --format=%ct docs mkdocs.yml)" >> "${GITHUB_ENV}"
- name: Deploy docs
run: |
mike deploy --push --branch gh-pages ${GITHUB_REF_NAME}