-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: build and deploy mkdocs to github pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: "recursive" | ||
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: '3.7' | ||
architecture: 'x64' | ||
|
||
# - name: Cache dependencies | ||
# uses: actions/cache@v1 | ||
# with: | ||
# path: ~/.cache/pip | ||
# key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | ||
# restore-keys: | | ||
# ${{ runner.os }}-pip- | ||
|
||
- name: Install dependencies | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install mkdocs | ||
- name: Build site | ||
run: mkdocs build | ||
|
||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./site |