add Quarto-live example #12
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
name: Build and Deploy | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- '*' | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '18.x' | |
registry-url: 'https://registry.npmjs.org' | |
- 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 deploy/netlify.toml dist | |
- name: Set up Quarto | |
uses: quarto-dev/quarto-actions/setup@v2 | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: add quarto-live for Quarto | |
run: | | |
quarto add r-wasm/quarto-live | |
working-directory: ./examples/Quarto | |
- name: render the REPL | |
run: | | |
quarto render examples/Quarto/repl-example.qmd --output-dir ../../dist | |
quarto render examples/Quarto/quarto-live.qmd --output-dir ../../dist | |
- name: Download kuzu-wasm | |
run: | | |
npm view @kuzu/kuzu-wasm dist.tarball | xargs curl -o dist/package.tgz | |
tar -xz -C dist -f dist/package.tgz && rm dist/package.tgz | |
- name: Deploy to Netlify | |
uses: nwtgck/actions-netlify@v3.0 | |
with: | |
publish-dir: './dist' | |
production-branch: master | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
deploy-message: "Deploy from GitHub Actions" | |
enable-pull-request-comment: false | |
enable-commit-comment: true | |
overwrites-pull-request-comment: true | |
enable-github-deployment: false | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
timeout-minutes: 10 |