-
-
Notifications
You must be signed in to change notification settings - Fork 517
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
072351b
commit 67f804e
Showing
4 changed files
with
74 additions
and
50 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: jupyterlite | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+' | ||
- 'v[0-9]+.[0-9]+.[0-9]+a[0-9]+' | ||
- 'v[0-9]+.[0-9]+.[0-9]+b[0-9]+' | ||
- 'v[0-9]+.[0-9]+.[0-9]+rc[0-9]+' | ||
workflow_dispatch: | ||
inputs: | ||
target: | ||
description: 'Site to build and deploy' | ||
type: choice | ||
options: | ||
- dev | ||
- main | ||
- dryrun | ||
required: true | ||
default: dryrun | ||
schedule: | ||
- cron: '0 19 * * SUN' | ||
|
||
jobs: | ||
deploy_jupyterlite: | ||
name: JupyterLite | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: Set and echo git ref | ||
id: vars | ||
run: | | ||
echo 'Deploying from ref ${GITHUB_REF#refs/*/}' | ||
echo 'tag=${GITHUB_REF#refs/*/}' >> $GITHUB_OUTPUT | ||
- name: Install the dependencies | ||
run: | | ||
python -m pip install -r ./lite/requirements.txt | ||
- name: Build pyodide wheels for JupyterLite | ||
run: | | ||
python ./scripts/panelite/build_pyodide_wheels.py lite/pypi | ||
- name: Convert content | ||
run: | | ||
python ./scripts/panelite/generate_panelite_content.py | ||
- name: Build the JupyterLite site | ||
run: | | ||
jupyter lite build --lite-dir lite --output-dir lite/dist | ||
- name: Upload dev | ||
if: | | ||
(github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'dev') || | ||
(github.event_name == 'workflow_run' && (contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc'))) | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
personal_token: ${{ secrets.ACCESS_TOKEN }} | ||
external_repository: pyviz-dev/panelite-dev | ||
publish_dir: ./lite/dist | ||
force_orphan: true | ||
- name: Upload prod | ||
if: | | ||
(github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'main') || | ||
(github.event_name == 'push' && !(contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc'))) | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
personal_token: ${{ secrets.ACCESS_TOKEN }} | ||
external_repository: pyviz-dev/panelite | ||
publish_dir: ./lite/dist | ||
cname: panelite.holoviz.org | ||
force_orphan: true |
File renamed without changes.
File renamed without changes.