Skip to content

Commit

Permalink
fix build documentation for ci/cd
Browse files Browse the repository at this point in the history
  • Loading branch information
nseyler1 committed Nov 13, 2023
1 parent 003c26d commit 7dc2007
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 5 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Continous Integration

on:
push:
branches: ["developpement"]
pull_request:
branches: ["main", "developpement"]

jobs:
check_duplicate:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v3.4.0
with:
skip_after_successful_duplicate: 'true'

doc:
needs: check_duplicate
if: ${{ needs.check_duplicate.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Setup documentation dependencies
run: pip install -r docs/requirements.txt
- name: Build documentation
run: sphinx-build docs/source/ build
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: 'build/html'

12 changes: 8 additions & 4 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,14 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build documentation
run: |
pip install -r docs/requirements.txt
sphinx-build docs/source/ build
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Setup Sphinx
run: pip install -r docs/requirements.txt
- name: Setup documentation dependencies
run: sphinx-build docs/source/ build
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import os
import sys

root_dir = os.path.realpath(os.path.join(sys.path[0], '..', '..'))
root_dir= os.path.realpath(os.path.join(os.path.dirname(__file__), '..', '..'))
sys.path.insert(0, root_dir)

# -- Project information -----------------------------------------------------
Expand Down

0 comments on commit 7dc2007

Please sign in to comment.