From 095a458d809c3b3f02f187906f6dc391e7d0b7a8 Mon Sep 17 00:00:00 2001 From: Jennings Anderson Date: Thu, 5 Mar 2026 10:30:46 -0800 Subject: [PATCH] Adding DuckDB-Wasm sandbox Signed-off-by: Jennings --- .github/workflows/staging_deploy.yml | 93 +++ js/explorer.js | 510 ++++++++++++++++ js/sandbox.js | 433 +++++++++++++ sandbox.html | 871 +++++++++++++++++++++++++++ 4 files changed, 1907 insertions(+) create mode 100644 .github/workflows/staging_deploy.yml create mode 100644 js/explorer.js create mode 100644 js/sandbox.js create mode 100644 sandbox.html diff --git a/.github/workflows/staging_deploy.yml b/.github/workflows/staging_deploy.yml new file mode 100644 index 0000000..8317a5c --- /dev/null +++ b/.github/workflows/staging_deploy.yml @@ -0,0 +1,93 @@ +--- +name: Staging Deploy +run-name: Publish workshop to staging website (for PR) + +on: + pull_request: + branches: [main] + +permissions: + id-token: write + contents: read + pull-requests: write + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.3' + bundler-cache: true + + - name: Install Jekyll + run: | + gem install jekyll bundler + if [ -f Gemfile ]; then + bundle install + fi + + - name: Build Jekyll site + run: | + if [ -f Gemfile ]; then + bundle exec jekyll build --baseurl "/${{ github.event.repository.name }}/pr/${{ github.event.number }}" + else + jekyll build --baseurl "/${{ github.event.repository.name }}/pr/${{ github.event.number }}" + fi + env: + JEKYLL_ENV: production + + - name: Upload build artifact + uses: actions/upload-artifact@v4 + with: + name: build-artifact + path: _site + if-no-files-found: error + + deploy: + name: Deploy + runs-on: ubuntu-latest + needs: build + environment: + name: staging + url: https://staging.overturemaps.org/${{ github.event.repository.name }}/pr/${{ github.event.number }}/index.html + + steps: + - name: Configure AWS credentials 🔐 + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: arn:aws:iam::763944545891:role/pages-staging-oidc-overturemaps + aws-region: us-west-2 + + - name: Download artifacts 📥 + uses: actions/download-artifact@v4 + with: + name: build-artifact + path: build + + - name: Copy to S3 + run: | + aws s3 sync --delete build s3://overture-managed-staging-usw2/gh-pages/${{ github.event.repository.name }}/pr/${{ github.event.number }}/ + + - name: Bust the Cache + run: aws cloudfront create-invalidation --distribution-id E1KP2IN0H2RGGT --paths "/${{ github.event.repository.name }}/pr/${{ github.event.number }}/*" + + - name: Get deploy timestamp + id: timestamp + run: echo "time=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT + + - name: Comment on PR + uses: marocchino/sticky-pull-request-comment@v2 + with: + message: | + ## 🚀 Workshop branch preview deployed! + + You can review your changes at https://staging.overturemaps.org/${{ github.event.repository.name }}/pr/${{ github.event.number }}/index.html + + --- + ♻️ Last refreshed: ${{ steps.timestamp.outputs.time }} diff --git a/js/explorer.js b/js/explorer.js new file mode 100644 index 0000000..a403776 --- /dev/null +++ b/js/explorer.js @@ -0,0 +1,510 @@ +// ============================================================ +// Overture Maps DuckDB Sandbox — Explorer +// Interactive file partition visualizer using Leaflet +// Loaded as a classic + + + + + + + + + + + + +