Skip to content

Commit

Permalink
Posible fix to docs generation in github pages 12
Browse files Browse the repository at this point in the history
  • Loading branch information
roy-cruz committed Apr 23, 2024
1 parent 5190832 commit ccc52dc
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 33 deletions.
66 changes: 33 additions & 33 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,40 +48,40 @@ jobs:
name: coverage-report-${{matrix.python-version}}
path: htmlcov/

docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Pages
id: pages
uses: actions/configure-pages@v2
# docs:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Setup Pages
# id: pages
# uses: actions/configure-pages@v2

- name: Install Nox
run: python -m pip install nox
# - name: Install Nox
# run: python -m pip install nox

- name: Run Nox
run: nox -s docs
# - name: Run Nox
# run: nox -s docs

- name: Upload documentation artifact
uses: actions/upload-artifact@v4
with:
name: site-artifact
path: ./docs/_build
# - name: Upload documentation artifact
# uses: actions/upload-artifact@v4
# with:
# name: site-artifact
# path: ./docs/_build

deploy:
needs:
- docs
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: site-artifact
- name: Configure Pages
uses: actions/configure-pages@v4
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
# deploy:
# needs:
# - docs
# environment:
# name: github-pages
# url: ${{ steps.deployment.outputs.page_url }}
# runs-on: ubuntu-latest
# steps:
# - name: Download artifact
# uses: actions/download-artifact@v4
# with:
# name: site-artifact
# - name: Configure Pages
# uses: actions/configure-pages@v4
# - name: Deploy to GitHub Pages
# id: deployment
# uses: actions/deploy-pages@v4
27 changes: 27 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: documentation

on: [push, pull_request, workflow_dispatch]

permissions:
contents: write

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- name: Install dependencies
run: |
pip install sphinx sphinx_rtd_theme myst_parser
- name: Sphinx build
run: |
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' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true

0 comments on commit ccc52dc

Please sign in to comment.