-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (38 loc) · 1.13 KB
/
mkdocs.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
39
40
41
42
43
44
45
46
47
name: Build and push to site branch
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
fetch-depth: '0'
- name: Install packages
run: pip install mkdocs-material
- name: Build website
run: mkdocs build
- name: Backup generated files
run: mv site /tmp/
- name: Add CNAME
working-directory: /tmp/site
run: echo 'docs.jinko.ml' > CNAME
- name: Commit changes
working-directory: /tmp/site
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-action"
git config --global init.defaultBranch "main"
git init
git add .
git commit -m "Automatic update of website. Build from $GITHUB_SHA"
- name: Push changes
uses: ad-m/github-push-action@master
with:
directory: /tmp/site
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: site
force: true