File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy MkDocs
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v3
13+ - name : Set up Python
14+ uses : actions/setup-python@v4
15+ with :
16+ python-version : ' 3.x'
17+ - name : Install dependencies
18+ run : |
19+ python -m pip install --upgrade pip
20+ pip install mkdocs
21+ # Add any other themes or plugins you need
22+ pip install mkdocs-material
23+ - name : Configure Git
24+ run : |
25+ git config --global user.name "GitHub Actions"
26+ git config --global user.email "[email protected] " 27+ - name : Deploy documentation
28+ run : |
29+ mkdocs gh-deploy --force
30+ # Create a CNAME file in the site directory
31+ echo "docs.yourdomain.com" > ./site/CNAME
32+ # Force push to gh-pages branch
33+ cd site
34+ git init
35+ git add .
36+ git commit -m "Deploy documentation updates"
37+ git push --force https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} main:gh-pages
You can’t perform that action at this time.
0 commit comments