Skip to content

Commit

Permalink
Create binder-build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ssp24 authored Jun 19, 2024
1 parent 864a17c commit cdab90e
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/binder-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Binder Build

on:
push:
branches:
- main # Adjust this to your default branch name

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'

- name: Install dependencies
run: |
pip install jupyter-repo2docker
- name: Build Binder image
env:
OPENAI_API_KEY: ${{ secrets.JUPYTER_AI_API_KEY }}
run: |
jupyter-repo2docker --no-run --user-name=jovyan --user-id=1000 --image-name=mybinder . \
&& docker run -e OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }} mybinder /bin/bash -c "source ~/.bashrc && jupyter notebook"

0 comments on commit cdab90e

Please sign in to comment.