From 75d8281ea46badee32386d0bf93030b71012de2a Mon Sep 17 00:00:00 2001 From: losfair Date: Tue, 19 Dec 2023 04:16:09 +0800 Subject: [PATCH] ci --- .github/workflows/ci.yml | 33 +++++++++++++++++++++++++++++++++ deno.json | 2 +- 2 files changed, 34 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..6683785 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,33 @@ +name: Deploy +on: + push: + branches: [main, dev] + pull_request: + branches: main + +jobs: + deploy: + name: Deploy + runs-on: ubuntu-latest + + permissions: + id-token: write + contents: read + + steps: + - name: Clone repository + uses: actions/checkout@v3 + + - name: Install Deno + uses: denoland/setup-deno@v1 + with: + deno-version: v1.x + + - name: Build step + run: "OPENAI_API_KEY=dummy deno task build" + + - name: Upload to Deno Deploy + uses: denoland/deployctl@v1 + with: + project: "chatspace" + entrypoint: "./main.ts" diff --git a/deno.json b/deno.json index 4ad21df..9fc0555 100644 --- a/deno.json +++ b/deno.json @@ -5,7 +5,7 @@ "cli": "echo \"import '\\$fresh/src/dev/cli.ts'\" | deno run --unstable -A -", "manifest": "deno task cli manifest $(pwd)", "start": "deno run -A --watch=static/,routes/ --unstable dev.ts", - "build": "deno run -A dev.ts build", + "build": "deno run -A --unstable dev.ts build", "preview": "deno run -A main.ts", "update": "deno run -A -r https://fresh.deno.dev/update ." },