Skip to content

Commit

Permalink
Posible fix to docs generation in github pages 15
Browse files Browse the repository at this point in the history
  • Loading branch information
roy-cruz committed Apr 23, 2024
1 parent 30f34f0 commit 7169e45
Showing 1 changed file with 35 additions and 48 deletions.
83 changes: 35 additions & 48 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:

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

Expand Down Expand Up @@ -47,59 +47,46 @@ jobs:
with:
name: coverage-report-${{matrix.python-version}}
path: htmlcov/

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
- uses: actions/checkout@v4
- name: Setup Pages
id: pages
uses: actions/configure-pages@v2

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

- name: Run Nox
run: nox -s docs

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

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
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
id: deployment
uses: actions/deploy-pages@v4
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true
# 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: Run Nox
# run: nox -s docs

# - 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

0 comments on commit 7169e45

Please sign in to comment.