Skip to content

Commit ba0e7a3

Browse files
authored
try: gh-pages (#166)
* try: gh-pages * use gh-pages-builder * prettier * only on pushes to main
1 parent 8f0c6de commit ba0e7a3

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/pages.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Deploy MkDocs Site to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions: write-all
9+
10+
jobs:
11+
build-deploy:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
ref: gh-pages-builder
17+
18+
- name: Copy contents to docs/
19+
run: |
20+
mkdir docs/
21+
22+
- name: Checkout main branch
23+
uses: actions/checkout@v3
24+
with:
25+
ref: main
26+
path: docs
27+
28+
- name: Set up Python
29+
uses: actions/setup-python@v4
30+
with:
31+
python-version: "3.x"
32+
33+
- name: Install Dependencies
34+
run: pip install -r requirements.txt
35+
36+
- name: Build the Site
37+
run: mkdocs build --clean
38+
39+
- name: Deploy to GitHub Pages
40+
uses: peaceiris/actions-gh-pages@v3
41+
with:
42+
github_token: ${{ secrets.GITHUB_TOKEN }}
43+
publish_branch: gh-pages
44+
publish_dir: ./site

0 commit comments

Comments
 (0)