Skip to content

Git workflow and pre-commit updates (#21) #7

Git workflow and pre-commit updates (#21)

Git workflow and pre-commit updates (#21) #7

Workflow file for this run

name: CI
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get install -y build-essential python-dev-is-python3 python3-numpy python3-pytest
- name: Build library
run: make PYTHON=python
- name: Run library tests
run: make test PYTHON=python
- name: Copy library to docs/ directory
run: cp -r permanent/ docs/permanent/
- name: Build documentation
uses: ammaraskar/sphinx-action@master
with:
build-command: "make html"
docs-folder: "docs/"
- name: Fix documentation permissions
run: |
chmod -c -R +rX "docs/build/html/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/build/html/
deploy:
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}
steps:
- name: Deploy artifact to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4