update github runner #38
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
# Publish pages when triggering the workflow on push and pull request, | |
# but only for the master branch | |
name: publish | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
publish_doc: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Set up Python 3.x | |
uses: actions/setup-python@v1 | |
with: | |
python-version: '3.x' | |
- name: Display Python version | |
run: python -c "import sys; print(sys.version)" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install mkdocs pymdown-extensions | |
# build pages | |
- name: Build and deploy pages with mkdocs | |
run: | | |
make build | |
# deploy to Github Page | |
# Note: don't use `mkdocs gh-deploy` avoiding overwrite customized building | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./build/site |