Update README.md #75
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: Update package website | |
on: push | |
jobs: | |
build-and-delpoy: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
pip3 install -r requirements.txt | |
- name: Build documentation | |
run: | | |
sphinx-apidoc -o docs/source qop -T -f -M | |
cd docs | |
make html | |
- name: Commit changes | |
run: | | |
git clone https://github.com/s-fleck/qop.git --branch gh-pages --single-branch gh-pages | |
mv docs/build/html /tmp | |
rm -r * | |
mv /tmp/html/* . | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add . | |
git commit -m "Update documentation" -a || true | |
- name: Deploy | |
if: success() | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
publish_branch: gh-pages | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: "." |