Skip to content

Commit

Permalink
Adjust sphinx job to match sensirion job
Browse files Browse the repository at this point in the history
  • Loading branch information
tyeth committed Nov 26, 2024
1 parent e329f1f commit 247af8f
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 44 deletions.
74 changes: 33 additions & 41 deletions .github/workflows/sphinx-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,47 +5,39 @@ on:
branches:
- master # Replace with your default branch if it's not 'master'
workflow_dispatch:
inputs:
run-environment:
description: OS to run check on
type: string
default: "ubuntu-20.04"
build-python-version:
description: Python version used for docs build
type: string
default: '3.6'

jobs:
build-and-deploy:
runs-on: ubuntu-latest

build_pages:
runs-on: ${{ inputs.run-environment || 'ubuntu-20.04' }}
steps:
- name: Checkout Source
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10' # Specify the Python version

- name: Install Dependencies
run: |
sudo apt-get install tree
python -m pip install --upgrade pip
# cd ${GITHUB_WORKSPACE}
pip install sphinx sphinx_rtd_theme
git clone https://github.com/good-enough-technology/CircuitPython_sensirion_i2c_driver
pip install ./CircuitPython_sensirion_i2c_driver/
pip install -r docs/requirements.txt
# Install any other dependencies here
- name: Install Package
run: |
pip install .
- name: Build Documentation
run: |
cd docs
make html
ls _build/html
tree _build/html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
user_name: 'tyeth'
user_email: '[email protected]'
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html

- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.build-python-version || '3.6' }}
cache: "pip"
- name: Install the project dependencies
run: |
python setup.py install
python -m pip install -r docs/requirements.txt
- name: Build documentation
run: cd docs && make html
- name: Upload html artifact for debugging
uses: actions/upload-pages-artifact@v1
with:
path: ./docs/_build/html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
user_name: 'tyeth'
user_email: '[email protected]'
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html
6 changes: 3 additions & 3 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sphinx>=3.0.0
sphinx_rtd_theme
sphinx~=1.8.3
sphinx_rtd_theme~=0.4.2

# Unfortunately the pip package "sphinxcontrib-versioning" is
# broken and not maintained anymore, thus cloning it directly from
# a forked Git repository which contains important bugfixes.
# git+https://github.com/leokoppel/sphinxcontrib-versioning.git@93fe26211de4322c0ddf347f51e095b580cdcd55
git+https://github.com/leokoppel/sphinxcontrib-versioning.git@93fe26211de4322c0ddf347f51e095b580cdcd55

0 comments on commit 247af8f

Please sign in to comment.