-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (46 loc) · 1.21 KB
/
buildsite.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
48
49
50
51
52
53
54
55
56
57
58
59
60
name: BuildSite
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mkdocs mkdocs-material
- name: Build site
run: mkdocs build
- name: Move site files to temp
run: mv site/ ../
#- name: Stash shit so no one sees and no errors
# run: git stash
#- name: Checkout gh-pages branch
# run: git checkout gh-pages
- uses: actions/checkout@v2
with:
ref: 'gh-pages'
- name: Kill the fire
run: rm * -vfr
- name: Move site back
run: mv ../site/* ./
- name: Basic git stuff
run: |
git add .
git config user.name "GitHub Actions"
git config user.email "chuenghowui@gmail.com"
git commit -m "Auto build site"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.TOKEN }}
branch: 'gh-pages'
# directory: '/home/runner/work/docs/docs/site'
force: true