Skip to content

Commit

Permalink
Use GitHub pages to host docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sitic committed Sep 11, 2023
1 parent 72aca8a commit 82fd661
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
- '*'
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
Expand Down Expand Up @@ -37,3 +41,33 @@ jobs:
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz

build_docs:
name: Build documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: pip install .[docs] opencv-python-headless

- name: Build documentation
run: python -m sphinx -b html docs public

- uses: actions/upload-pages-artifact@v2
with:
path: ./public

deploy:
permissions:
pages: write
id-token: write
needs: build_docs
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ optimap/_version.py
*.whl
public
example_data
jupyter_execute

# Created by https://www.toptal.com/developers/gitignore/api/python,pycharm,vscode,linux,macos,windows
# Edit at https://www.toptal.com/developers/gitignore?templates=python,pycharm,vscode,linux,macos,windows
Expand Down

0 comments on commit 82fd661

Please sign in to comment.