Pass global scope to script invokations #137
  
    
      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: Build and Deploy | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - feature/save_button | |
| pull_request: | |
| branches: | |
| - '*' | |
| workflow_dispatch: | |
| jobs: | |
| build-kernel: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.build-info.outputs.version }} | |
| build_time: ${{ steps.build-info.outputs.build_time }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Base Setup | |
| uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
| - name: Install dependencies | |
| run: python -m pip install -U "jupyterlab==4.3.6" | |
| - name: Build the extension | |
| run: | | |
| cd kernel | |
| jlpm | |
| jlpm build:prod | |
| hatch build | |
| - name: Upload wheel files | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheel-artifacts | |
| path: kernel/dist/*.whl | |
| if-no-files-found: error | |
| build: | |
| needs: build-kernel | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Download wheel files | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: wheel-artifacts | |
| path: kernel | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install the dependencies | |
| run: | | |
| python -m pip install -r requirements.txt | |
| - name: Build the JupyterLite site | |
| run: | | |
| cp README.md content | |
| jupyter lite build --contents content --output-dir dist | |
| cp -r binaries dist/ | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./dist | |
| deploy: | |
| needs: build | |
| if: github.ref == 'refs/heads/main' | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |