-
-
Notifications
You must be signed in to change notification settings - Fork 258
34 lines (29 loc) · 933 Bytes
/
publish.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
name: Publish docs via GitHub Pages
on:
push:
branches:
- main
jobs:
build:
name: Deploy docs
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v2
- name: Copy README to docs and remove toc
run: sed -n '/<!--toc-->/{p; :a; N; /<!--toc_end-->/!ba; s/.*\n//}; p' README.md > docs/index.md
- name: Copy content files to docs
run: |
cp CONTRIBUTING.md docs/contributing.md
cp education.md docs/education.md
- name: Add meta tags to index.md
run: cat docs/meta_tags.md | cat - docs/index.md > temp && mv temp docs/index.md
- uses: actions/setup-python@v2
with:
python-version: 3.x
- run: |
pip install mkdocs-material
- name: Build with mkdocs and deploy
run: mkdocs gh-deploy --force
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}