update readme formatting #157
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: Documentation | |
on: | |
push: | |
branches: | |
- main # on default branch | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout main branch | |
uses: actions/checkout@v2 | |
with: | |
ref: main | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install setuptools and wheel | |
run: | | |
pip install setuptools wheel | |
- name: Install project dependencies | |
run: | | |
pip install -e .[accelerators] | |
- name: Install pdoc | |
run: | | |
pip install pdoc | |
- name: Generate documentation with MathJax support | |
run: | | |
pdoc hw2d -o temp_docs --math --docformat google | |
- name: Prepare docs directory for gh-pages | |
run: | | |
mkdir -p docs/docs | |
cp -r temp_docs/* docs/docs/ | |
mkdir docs/docs/imgs | |
cp -r imgs/* docs/docs/imgs/ | |
ls docs/docs/imgs | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GH_PAT }} | |
publish_dir: ./docs | |
publish_branch: gh-pages | |
keep_files: false |