Add changes for 2aa41bbb21ebfbc2b9096bf8d163c1395f2d1e6e #328
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
name: build doc | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
with: | |
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token | |
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | |
- name: install pandoc linux | |
run: sudo apt install pandoc | |
if: runner.os == 'Linux' | |
- name: Set up Python 3.9 | |
uses: actions/[email protected] | |
with: | |
python-version: 3.9 | |
- name: prepare pip cache | |
id: prepare-cache-pip | |
uses: ./.github/actions/prepare-cache-pip | |
- name: pip cache | |
uses: actions/[email protected] | |
with: | |
path: ${{ steps.prepare-cache-pip.outputs.cache-dir }} | |
key: ubuntu-latest-3.9-pip-${{ hashFiles('**/docs_requirements.txt') }}-${{ hashFiles('**/setup.cfg') }} | |
restore-keys: | | |
ubuntu-latest-3.9-pip- | |
#- name: install requirements.txt | |
# run: | | |
# pip install -r requirements.txt | |
- name: install docs_requirements.txt | |
run: | | |
pip install -r docs_requirements.txt | |
- name: Build and Commit | |
uses: sphinx-notes/pages@master | |
with: | |
documentation_path: docs | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.DOC_TOKEN }} | |
branch: docs | |
force: true |