generated from Enveloppe/mkdocs-publisher-template
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (30 loc) · 1.01 KB
/
Deploy_to_gh-pages.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
name: Deploy MkDocs To gh-pages
env:
TZ: Asia/Shanghai
on:
push:
branches:
- main # the branch where you store the mkdocs source files
permissions:
actions: write
checks: write
contents: write
deployments: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
= name: Dependencies
run: sudo apt-get install -y pngquant
- name: Checkout
uses: actions/checkout@v3 # this action clones your repository
with:
fetch-depth: 0 # 默认为1,表示只拉去最新commit信息,会导致当前文件显示的创建时间、更新时间都为commit的时间
- name: Set up Python
uses: actions/setup-python@v4 # this action sets up a python environment
with:
python-version: "3.11"
- name: Deploy
uses: mhausenblas/mkdocs-deploy-gh-pages@master # this action builds and deploys your mkdocs site to GitHub Pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # this is a token provided by GitHub Actions