Skip to content

Commit cde8a88

Browse files
feat: Add action to build and deploy pages to GH-Pages
1 parent 3dc5ba3 commit cde8a88

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

.github/workflows/gh-pages.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish Docs to GitHub Pages
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
push:
8+
branches:
9+
- develop
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v2
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: 3.x
23+
24+
- name: Install dependencies
25+
run: pip install mkdocs-material
26+
27+
- name: Build docs
28+
run: mkdocs build
29+
30+
- name: Deploy to GitHub Pages
31+
uses: peaceiris/actions-gh-pages@v3
32+
with:
33+
personal_token: ${{ secrets.GITHUB_TOKEN }}
34+
publish_dir: ./site

mkdocs.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ docker run --rm -it \
99
-w $MOUNT_FOLDER \
1010
-p $MKDOCS_DEV_PORT:$MKDOCS_DEV_PORT \
1111
-e MKDOCS_DEV_ADDR="$MKDOCS_DEV_ADDR:$MKDOCS_DEV_PORT" \
12-
squidfunk/mkdocs-material:3.2.0 $*
12+
squidfunk/mkdocs-material:latest $*

0 commit comments

Comments
 (0)