Skip to content

Commit

Permalink
attempt to publish docs 1
Browse files Browse the repository at this point in the history
  • Loading branch information
geo-martino committed Jan 6, 2024
1 parent 725861a commit c0b9463
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 12 deletions.
39 changes: 28 additions & 11 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@ permissions:
contents: write

jobs:
docs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v3

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

- name: Install module
run: |
Expand All @@ -19,13 +25,24 @@ jobs:
- name: Sphinx build
run: |
sphinx-apidoc -o doc src
sphinx-build doc .build
sphinx-build doc .build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
- name: Jekyll build
uses: actions/jekyll-build-pages@v1
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: .build/
force_orphan: true
source: ./.build
destination: ./_site

- name: Upload artifact
uses: actions/upload-pages-artifact@v3

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = ['sphinx.ext.autodoc']
extensions = ['sphinx.ext.autodoc', 'sphinx_jekyll_builder']

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ dev = [
]
docs = [
"sphinx~=7.2",
"sphinx-jekyll-builder~=0.3",
"sphinx_rtd_theme~=2.0",
"myst_parser~=2.0",
]
Expand Down

0 comments on commit c0b9463

Please sign in to comment.