Fix json load to add entity res, minor cleanup #20
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: Run Notebook and Commit Version With Output | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| branches: | |
| - main | |
| jobs: | |
| run-notebooks: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install jupyter nbconvert | |
| - name: Create env file | |
| run: | | |
| echo "${{ secrets.WORKSHOP_ENV }}" > ws.env | |
| - name: Create Aura instance | |
| run: | | |
| source ws.env | |
| python .github/scripts/aura.py configure \ | |
| --tenant-id $AURA_TENANT_ID \ | |
| --client-id $AURA_CLIENT_ID \ | |
| --client-secret $AURA_CLIENT_SECRET \ | |
| --region $AURA_REGION \ | |
| --cloud-provider $AURA_CLOUD_PROVIDER \ | |
| >> ws.env | |
| env: | |
| ENV_FILE: ws.env | |
| - name: Copy env file to each workshop subdir | |
| run: | | |
| cp ws.env customers-and-products/ws.env | |
| cp ws.env talent/ws.env | |
| env: | |
| ENV_FILE: ws.env | |
| - name: Run customer and products data loading notebook | |
| run: | | |
| jupyter nbconvert --to notebook --ExecutePreprocessor.timeout=1200 --execute customers-and-products/data-load.ipynb | |
| rm customers-and-products/data-load.nbconvert.ipynb | |
| env: | |
| ENV_FILE: ws.env | |
| - name: Run and save customer and products workshop notebook | |
| run: | | |
| export AUTOMATED_RUN=true | |
| jupyter nbconvert --to notebook --ExecutePreprocessor.timeout=1200 --execute customers-and-products/genai-workshop.ipynb | |
| mv customers-and-products/genai-workshop.nbconvert.ipynb customers-and-products/genai-workshop-w-outputs.ipynb | |
| env: | |
| ENV_FILE: ws.env | |
| - name: Run customer and products example-app-only notebook | |
| run: | | |
| export AUTOMATED_RUN=true | |
| jupyter nbconvert --to notebook --ExecutePreprocessor.timeout=1200 --execute customers-and-products/genai-example-app-only.ipynb | |
| rm customers-and-products/genai-example-app-only.nbconvert.ipynb | |
| env: | |
| ENV_FILE: ws.env | |
| - name: Delete Aura instance | |
| run: | | |
| source ws.env | |
| python .github/scripts/aura.py delete \ | |
| --tenant-id $AURA_TENANT_ID \ | |
| --client-id $AURA_CLIENT_ID \ | |
| --client-secret $AURA_CLIENT_SECRET \ | |
| --instance-id $AURA_INSTANCEID | |
| env: | |
| ENV_FILE: ws.env | |
| - name: Commit and push notebook with outputs | |
| run: | | |
| git config --global user.name 'GitHub Action' | |
| git config --global user.email '[email protected]' | |
| git add customers-and-products/genai-workshop-w-outputs.ipynb | |
| git commit -m "Auto-commit: Run notebook and update notebook with output file" | |
| git push |