From dcca21ffa96a2a7be45bcac60165919f58bbe971 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=A2=E3=83=AC=E3=82=AF=E3=82=B5=E3=83=B3=E3=83=80?= =?UTF-8?q?=E3=83=BC=2Eeth?= Date: Tue, 20 Feb 2024 03:47:21 +0900 Subject: [PATCH] Merge branch 'test/cd' --- .github/workflows/cloudflare-deploy.yml | 3 ++- .gitignore | 4 ++-- build/esbuild-server.ts | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cloudflare-deploy.yml b/.github/workflows/cloudflare-deploy.yml index 337bf61..0e339c9 100644 --- a/.github/workflows/cloudflare-deploy.yml +++ b/.github/workflows/cloudflare-deploy.yml @@ -1,6 +1,7 @@ name: Deploy to Cloudflare Pages on: + workflow_dispatch: workflow_run: workflows: ["Build"] # Needs to build first before we can deploy. types: @@ -31,7 +32,7 @@ jobs: repository: ${{ github.repository }} production_branch: ${{ github.event.repository.default_branch }} output_directory: "dist" - is_production: ${{ github.event_name == 'push' && github.ref == 'refs/heads/${{ github.event.repository.default_branch }}' }} + current_branch: ${{ github.ref_name }} # env: # Add any environment variables you need to pass along here # SUPABASE_URL: ${{ secrets.SUPABASE_URL }} diff --git a/.gitignore b/.gitignore index 64d4f8b..ee9ac9c 100644 --- a/.gitignore +++ b/.gitignore @@ -6,5 +6,5 @@ node_modules .yarn .pnp.cjs .pnp.loader.mjs -static/dist -.env \ No newline at end of file +.env +dist \ No newline at end of file diff --git a/build/esbuild-server.ts b/build/esbuild-server.ts index bb992ae..8ca9853 100644 --- a/build/esbuild-server.ts +++ b/build/esbuild-server.ts @@ -11,7 +11,7 @@ import { esBuildContext } from "./esbuild-build"; export async function server() { const _context = await esbuild.context(esBuildContext); const { port } = await _context.serve({ - servedir: "static", + servedir: "dist", port: 8080, }); console.log(`http://localhost:${port}`);