Simplify workfow #11
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
name: Update site | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-jupyterlite: | |
runs-on: ubuntu-latest | |
name: Build JupyterLite | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Install the dependencies | |
working-directory: jupyterlite | |
run: | | |
python -m pip install -r requirements.txt | |
- name: Build the JupyterLite site | |
working-directory: jupyterlite | |
run: | | |
jupyter lite build --contents notebooks --output-dir ../assets/jupyterlite | |
update-site: | |
runs-on: ubuntu-20.04 | |
needs: build-jupyterlite | |
name: Update site on Github Pages | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
if: ${{ github.ref == 'refs/heads/main' }} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public | |
user_name: 'github-actions[bot]' | |
user_email: 'github-actions[bot]@users.noreply.github.com' | |
enable_jekyll: true |