Skip to content

Merge pull request #15 from ncc-brain/dependabot/github_actions/dot-g… #258

Merge pull request #15 from ncc-brain/dependabot/github_actions/dot-g…

Merge pull request #15 from ncc-brain/dependabot/github_actions/dot-g… #258

Workflow file for this run

name: PyNeon CI
on: [push, pull_request]
jobs:
ruff-format:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.13"
- name: Install format tools
run: |
pip install ruff isort
- name: Sort imports with isort
run: isort --profile black .
- name: Format code with Ruff
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 isort and ruff" || echo "No changes to commit"
git push
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.13"
- name: Install Pandoc
run: sudo apt-get install pandoc
- name: Install docs dependencies
run: pip install .[doc]
- name: Build Documentation
env:
PYTHONPATH: ${{ github.workspace }}
run: make html
- name: Create .nojekyll file
run: touch build/html/.nojekyll
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: html-docs
path: build/html
- name: Deploy (GitHub Pages)
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: build/html
- name: Clean build folder
run: rm -rf build/*