Skip to content

Commit

Permalink
ci: Add actions to automatically build documentation after changes
Browse files Browse the repository at this point in the history
  • Loading branch information
thomass-dev committed Oct 24, 2024
1 parent 45a0eeb commit c8e5bc9
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Sphinx

on:
push:
branches:
- test-sphinx
paths:
- '.github/workflows/sphinx.yml'
- 'examples/**'
- 'skore/**'
- 'sphinx/**'

permissions:
contents: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
sphinx:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- name: Setup
run: |
python -m pip install --upgrade pip
python -m pip install './skore[sphinx]'
- name: Build
run: |
(cd sphinx && make html)
rm -rf docs/latest
mv sphinx/build/html docs/latest
- name: Commit
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add docs/latest
git commit -m 'docs: Build documentation triggered by ${{ github.sha }} '
git push

0 comments on commit c8e5bc9

Please sign in to comment.