From cdab90e55e50c2ca05c9939e93b843796f553bbd Mon Sep 17 00:00:00 2001 From: ssp24 <62755563+ssp24@users.noreply.github.com> Date: Wed, 19 Jun 2024 12:17:02 +0200 Subject: [PATCH] Create binder-build.yml --- .github/workflows/binder-build.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/binder-build.yml diff --git a/.github/workflows/binder-build.yml b/.github/workflows/binder-build.yml new file mode 100644 index 0000000..30126ed --- /dev/null +++ b/.github/workflows/binder-build.yml @@ -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"