Skip to content

update readme

update readme #18

Workflow file for this run

name: GitHub Pages
on:
push:
branches:
- main
pull_request:
jobs:
deploy:
runs-on: ubuntu-22.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v3
with:
ref: gh-pages # Check out the gh-pages branch
- name: Clear gh-pages branch
run: |
git rm -rf * || true
git clean -fdx
touch .nojekyll
git add .nojekyll
git commit -m "Clear gh-pages branch" || true
git push origin gh-pages
- uses: actions/checkout@v3
with:
ref: main # Check out the main branch again
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Upgrade pip
run: |
# install pip=>20.1 to use "pip cache dir"
python3 -m pip install --upgrade pip
- name: Get pip cache dir
id: pip-cache
run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}-v2
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: python3 -m pip install -r ./requirements.txt
- name: Install Sphinx
run: python3 -m pip install sphinx sphinx_rtd_theme sphinx-autodoc-typehints
- name: print pwd
run: pwd
- name: list files
run: ls -al
- name: compile
run: |
cd ./docs
sphinx-build -b html ./source _build/html
- name: Create .nojekyll file
run: |
pwd
touch ./.nojekyll
touch ./docs/_build/html/.nojekyll
touch ./docs/.nojekyll
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html