-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Add actions to automatically build documentation after changes
- Loading branch information
1 parent
45a0eeb
commit c8e5bc9
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |