forked from Sensirion/python-i2c-sen5x
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust sphinx job to match sensirion job
- Loading branch information
Showing
2 changed files
with
36 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |