Skip to content

Commit

Permalink
update ci & precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
lkeegan committed May 6, 2024
1 parent 11b9875 commit 1f3b8f6
Show file tree
Hide file tree
Showing 5 changed files with 199 additions and 189 deletions.
28 changes: 19 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
name: Publish reveal.js slides
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.12
- run: pip install -r requirements.txt
- run: sudo apt update -qy && sudo apt install ffmpeg -qy
- run: jupyter nbconvert *.ipynb --to slides --execute
Expand All @@ -28,10 +28,20 @@ jobs:
sleep 10
done
- run: mv *.slides.html *.pdf dist/. && mv dist/index.slides.html dist/index.html
- uses: JamesIves/[email protected]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
name: Deploy to gh-pages
- uses: actions/upload-pages-artifact@v3
with:
branch: gh-pages
folder: dist
single-commit: true
path: "dist/"

deploy:
if: github.ref == 'refs/heads/main'
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/deploy-pages@v4
id: deployment
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending

- repo: https://github.com/psf/black
rev: 23.7.0
rev: 24.4.2
hooks:
- id: black
- id: black-jupyter

- repo: https://github.com/kynan/nbstripout
rev: 0.6.1
rev: 0.7.1
hooks:
- id: nbstripout
Loading

0 comments on commit 1f3b8f6

Please sign in to comment.