File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy MkDocs to GitHub Pages
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ workflow_dispatch :
8+
9+ permissions :
10+ contents : write
11+
12+ jobs :
13+ deploy :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Checkout repository
17+ uses : actions/checkout@v4
18+ with :
19+ fetch-depth : 0 # Full history for git-revision-date-localized and git-authors plugins
20+
21+ - name : Setup Python
22+ uses : actions/setup-python@v5
23+ with :
24+ python-version : " 3.10"
25+
26+ - name : Cache pip dependencies
27+ uses : actions/cache@v4
28+ with :
29+ path : ~/.cache/pip
30+ key : ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
31+ restore-keys : |
32+ ${{ runner.os }}-pip-
33+
34+ - name : Install dependencies
35+ run : pip install -r requirements.txt
36+
37+ - name : Configure Git
38+ run : |
39+ git config user.name "github-actions[bot]"
40+ git config user.email "github-actions[bot]@users.noreply.github.com"
41+
42+ - name : Deploy to GitHub Pages
43+ run : mkdocs gh-deploy --force
You can’t perform that action at this time.
0 commit comments