Skip to content

Commit

Permalink
doc: hook up sphinx
Browse files Browse the repository at this point in the history
  • Loading branch information
whot authored and martinpitt committed Nov 13, 2023
1 parent e7e18d8 commit 8d58557
Show file tree
Hide file tree
Showing 5 changed files with 239 additions and 114 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Deploy to GitHub pages

on:
push:
branches: ["main"]

# Allow running this workflow manually from the Actions tab
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
runs-on: ubuntu-22.04
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4

- name: Install dependencies from pip
run: pip install sphinx sphinx-rtd-theme sphinx-autoapi myst-parser

- name: Build with sphinx
run: sphinx-build -M html doc/ doc/

- name: Move output to target directory
run: mv doc/html public_html/

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Upload pages artifact
uses: actions/upload-pages-artifact@v1
with:
path: public_html/

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
10 changes: 6 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/dist
/dbusmock/_version.py
__pycache__
*.egg-info
MANIFEST
/build
/dbusmock/_version.py
/dist
/doc/doctrees
/doc/html
MANIFEST
__pycache__
Loading

0 comments on commit 8d58557

Please sign in to comment.