Add ipykernel setup for Binder Pixi environment #87
Workflow file for this run
This file contains hidden or 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: deploy-book | |
| # Only run this when the master branch changes | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| # This job installs dependencies, build the book, and pushes it to `gh-pages` | |
| jobs: | |
| deploy-book: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/cache@v4 | |
| with: | |
| path: /var/lib/apt | |
| key: apt-cache-v2 | |
| restore-keys: | | |
| apt-cache-v2 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends \ | |
| curl \ | |
| bzip2 \ | |
| ca-certificates \ | |
| dvipng \ | |
| texlive-fonts-recommended \ | |
| texlive-fonts-extra \ | |
| texlive-latex-extra \ | |
| cm-super | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 200 | |
| fetch-tags: true | |
| ref: ${{ github.ref }} | |
| - uses: prefix-dev/[email protected] | |
| with: | |
| pixi-version: v0.55.0 | |
| run-install: false | |
| - run: pixi lock --check | |
| - name: Install project environment | |
| run: pixi install --locked | |
| - name: Prepare tutorial data | |
| run: | | |
| set -xeuo pipefail | |
| data_dir="${{ github.workspace }}/data" | |
| data_file="$data_dir/dwi_full_brainmask.h5" | |
| mkdir -p "$data_dir" | |
| curl -L \ | |
| https://files.osf.io/v1/resources/8k95s/providers/osfstorage/68e5464a451cf9cf1fc51a53 \ | |
| --output "$data_file" | |
| test -s "$data_file" | |
| echo "NIPREPS_TUTORIAL_DATA=$data_file" >> "$GITHUB_ENV" | |
| # Build the page | |
| - name: Build the book | |
| run: pixi run build-book | |
| # Push the book's HTML to github-pages | |
| - name: GitHub Pages action | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./docs/_build/html |