Skip to content

tutorial update

tutorial update #17

Workflow file for this run

name: "Sphinx: Render docs"
on: push
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.12'
- name: Install Pandoc
run: |
sudo apt-get install pandoc
- name: Install Sphinx & Dependencies
run: |
pip install .[doc]
pip install ruff
- name: Format Code
env:
PYTHONPATH: ${{ github.workspace }} # Add your module's path to PYTHONPATH
run: ruff format
- name: Commit changes if any
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .
git commit -m "Format code with ruff" || echo "No changes to commit"
git push
- name: Build Documentation
env:
PYTHONPATH: ${{ github.workspace }} # Add your module's path to PYTHONPATH
run: make html
- name: Create .nojekyll file
run: |
touch build/html/.nojekyll # Create the .nojekyll file in the html directory
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: html-docs
path: build/html
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: build/html
- name: Remove build folder
run: |
rm -rf build/*