Skip to content

Commit

Permalink
rename github actions, add auto-build docs github action
Browse files Browse the repository at this point in the history
  • Loading branch information
erexer committed Nov 5, 2024
1 parent d478340 commit 8963884
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 4 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: docs

on:
push:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install pandoc
run: |
sudo apt-get update -y && sudo apt-get install -y pandoc
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Update pip and install python dependencies
run: |
python -m pip install --upgrade pip
pip install .[docs]
- name: Build html docs
working-directory: 'docs/'
run: |
make html
- name: Commit documentation changes
run: |
cd docs/build/html
git init
git add -A
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git commit -m 'deploy' -a || true
- name: Push changes to gh-pages
uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: docs/build/html
force: true
github_token: ${{ secrets.GITHUB_TOKEN }}
6 changes: 2 additions & 4 deletions .github/workflows/build.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build
name: test

on: [push, pull_request]

Expand Down Expand Up @@ -31,7 +31,5 @@ jobs:
- name: Test and generate coverage report on Linux
run: |
pip install pytest
pip install pytest-cov
pip install .[test]
pytest --cov=./ --cov-report=xml

0 comments on commit 8963884

Please sign in to comment.