From 55ef5ff3c74b9d0813981d5f7f1efd1d40b07c37 Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Thu, 8 May 2025 22:56:10 -0400 Subject: [PATCH 1/9] playground: setup autodeploy in ci --- playground/package.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/playground/package.json b/playground/package.json index c1379b03..0f2af45f 100644 --- a/playground/package.json +++ b/playground/package.json @@ -34,5 +34,9 @@ "typescript": "~5.7.2", "typescript-eslint": "^8.22.0", "vite": "^6.1.0" + }, + "volta": { + "node": "18.7.0", + "pnpm": "8.15.8" } } From a77de90e5efcbdcb180eb9c0693590d6bb82478a Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Thu, 8 May 2025 22:58:55 -0400 Subject: [PATCH 2/9] ci --- .github/workflows/rust.yml | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 76075b87..2104f012 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -254,6 +254,47 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max + deploy-playground: + if: startsWith(github.ref, 'refs/tags/') + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Cache + uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # pin@v2 + + - name: Install wasm-pack + run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh + + - uses: pnpm/action-setup@v2 + with: + version: 8 + - uses: actions/setup-node@v3 + with: + node-version-file: "playground/package.json" + cache-dependency-path: "playground/pnpm-lock.yaml" + cache: "pnpm" + + - name: Install JS dependencies + working-directory: "playground" + run: pnpm install + + - name: Build + working-directory: "playground" + run: pnpm build + + - name: Deploy to Netlify + uses: nwtgck/actions-netlify@v2 + with: + publish-dir: "playground/dist" + production-branch: main + github-token: ${{ secrets.GITHUB_TOKEN }} + deploy-message: "Deploy from GitHub Actions" + env: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} + lint: needs: pre_job if: needs.pre_job.outputs.should_skip != 'true' From dbb14cd40a1dd7307914be9e7baf9c89ac308383 Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Fri, 9 May 2025 18:31:15 -0400 Subject: [PATCH 3/9] run the job --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 2104f012..d668c381 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -255,7 +255,7 @@ jobs: cache-to: type=gha,mode=max deploy-playground: - if: startsWith(github.ref, 'refs/tags/') + # if: startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-22.04 steps: - name: Checkout From 202111b18112dd98d2c5d0b74204d4dc01bc6e9a Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Fri, 9 May 2025 18:39:45 -0400 Subject: [PATCH 4/9] cfg --- .github/workflows/rust.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d668c381..864cea76 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -291,6 +291,7 @@ jobs: production-branch: main github-token: ${{ secrets.GITHUB_TOKEN }} deploy-message: "Deploy from GitHub Actions" + fails-without-credentials: false env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} From 739c97c4baaac37f3e14becc7db5aa6f2a780890 Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Fri, 9 May 2025 18:43:38 -0400 Subject: [PATCH 5/9] fix --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 864cea76..8624d948 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -291,7 +291,7 @@ jobs: production-branch: main github-token: ${{ secrets.GITHUB_TOKEN }} deploy-message: "Deploy from GitHub Actions" - fails-without-credentials: false + fails-without-credentials: true env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} From f6a12765b6e4546b9f62c89869f4b8ca0ceb5dc4 Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Fri, 9 May 2025 18:47:40 -0400 Subject: [PATCH 6/9] fix env --- .github/workflows/rust.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 8624d948..76f5a052 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -293,8 +293,8 @@ jobs: deploy-message: "Deploy from GitHub Actions" fails-without-credentials: true env: - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} + NETLIFY_AUTH_TOKEN: ${{ secrets.PLAYGROUND_NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.PLAYGROUND_NETLIFY_SITE_ID }} lint: needs: pre_job From 2f4a75d323bf2b5eda86e4649e42637d96dff25e Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Fri, 9 May 2025 18:53:30 -0400 Subject: [PATCH 7/9] fix env --- playground/src/App.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playground/src/App.tsx b/playground/src/App.tsx index 3bbaef56..7cc03f80 100644 --- a/playground/src/App.tsx +++ b/playground/src/App.tsx @@ -29,7 +29,7 @@ select * from users; const SETTINGS = { value: DEFAULT_CONTENT, - language: "sql", + language: "pgsql", tabSize: 2, theme: "vs-dark", minimap: { enabled: false }, From d7101562ee241d664e7bf52102cc93d8c7e217d8 Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Fri, 9 May 2025 19:01:38 -0400 Subject: [PATCH 8/9] fix --- .github/workflows/rust.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 76f5a052..fa4adbbb 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -292,6 +292,8 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} deploy-message: "Deploy from GitHub Actions" fails-without-credentials: true + enable-pull-request-comment: false + enable-commit-comment: false env: NETLIFY_AUTH_TOKEN: ${{ secrets.PLAYGROUND_NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.PLAYGROUND_NETLIFY_SITE_ID }} From f09dab2bb78e60be0b41e8ba964402c4c545c464 Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Fri, 9 May 2025 19:02:07 -0400 Subject: [PATCH 9/9] fix --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index fa4adbbb..079e74bf 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -255,7 +255,7 @@ jobs: cache-to: type=gha,mode=max deploy-playground: - # if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-22.04 steps: - name: Checkout