docs: fix typo and pip instructions #51
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: CI | |
on: [push, pull_request] | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.9] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install pybind11 setuptools coverage | |
- name: Install | |
run: python -m pip install . | |
- name: Test | |
run: coverage run -m unittest discover | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
docs: | |
needs: build-and-test | |
permissions: | |
pages: write | |
id-token: write | |
runs-on: ubuntu-latest | |
if: ${{ github.ref == 'refs/heads/main' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pybind11 setuptools | |
- name: Install | |
run: pip install .[docs] | |
- name: Build documentation | |
run: | | |
sphinx-apidoc -o docs/source sortedl1 | |
cd docs | |
make html | |
- name: Setup pages | |
uses: actions/configure-pages@v3 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: "docs/build/html/" | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 | |
release: | |
if: ${{ github.ref == 'refs/heads/main' }} | |
needs: | |
- docs | |
- build-and-test | |
permissions: | |
contents: write | |
pull-requests: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: google-github-actions/release-please-action@v3 | |
with: | |
token: ${{ secrets.RELEASE_PLEASE_TOKEN }} | |
release-type: python | |
package-name: sortedl1 | |
bump-minor-pre-major: true |