From 7d8a256c8b76da48b15892cc123d942db9e300ea Mon Sep 17 00:00:00 2001
From: Andy Pan <andy0130tw@yahoo.com.tw>
Date: Sun, 15 Sep 2024 19:55:13 +0800
Subject: [PATCH] Try out workflow

---
 .github/workflows/ci.yml                      | 70 +++++++++++++++++++
 .../src/codemirror-shared-history.ts          |  2 +-
 2 files changed, 71 insertions(+), 1 deletion(-)
 create mode 100644 .github/workflows/ci.yml

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..7b65bef
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,70 @@
+name: CI
+
+# https://turbo.build/repo/docs/guides/ci-vendors/github-actions
+
+on:
+  push:
+    branches: ['@qbane/dev']
+
+  workflow_dispatch:
+
+jobs:
+  build:
+    name: Build
+    timeout-minutes: 15
+    runs-on: ubuntu-latest
+    # To use Remote Caching, uncomment the next lines and follow the steps below.
+    # env:
+    #  TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
+    #  TURBO_TEAM: ${{ vars.TURBO_TEAM }}
+    #  TURBO_REMOTE_ONLY: true
+
+    steps:
+      - name: Check out code
+        uses: actions/checkout@v4
+        with:
+          fetch-depth: 2
+
+      - name: Install pnpm
+        uses: pnpm/action-setup@v4
+        with:
+          version: 9
+          run_install: false
+
+      - name: Setup Node.js environment
+        uses: actions/setup-node@v4
+        with:
+          node-version: 20
+          cache: 'pnpm'
+
+      - name: Install dependencies
+        run: pnpm install
+
+      - name: Build
+        run: pnpm run build
+
+      - name: Setup Pages
+        uses: actions/configure-pages@v5
+
+      - name: Upload artifact
+        uses: actions/upload-pages-artifact@v3
+        with:
+          path: 'lezer-playground/dist'
+
+  deploy:
+    environment:
+      name: github-pages
+      url: ${{steps.deployment.outputs.page_url}}
+
+    permissions:
+      contents: read
+      pages: write
+      id-token: write
+
+    runs-on: ubuntu-latest
+    needs: build
+
+    steps:
+      - name: Deploy to GitHub Pages
+        id: deployment
+        uses: actions/deploy-pages@v4
diff --git a/packages/codemirror-editor-in-chief/src/codemirror-shared-history.ts b/packages/codemirror-editor-in-chief/src/codemirror-shared-history.ts
index 93dac5f..c2c3915 100644
--- a/packages/codemirror-editor-in-chief/src/codemirror-shared-history.ts
+++ b/packages/codemirror-editor-in-chief/src/codemirror-shared-history.ts
@@ -31,7 +31,7 @@ import {
   EditorRemoveEffect,
   EditorHasSelectionField,
 } from "./editor-in-chief";
-import { compact } from "lodash";
+import { compact } from "lodash-es";
 import { EditorInChiefSelection, CellStateEffect } from "./wrap-cell-types";
 import { EditorInChiefCommand, EditorInChiefKeyBinding } from "./wrap/keymap";
 import {