From a2704e1a873876c730eaaf8440eafcde0c00e1da Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Thu, 5 Oct 2023 02:15:18 +0800 Subject: [PATCH] chore: add deploy-deno workflow --- .github/workflows/deploy-deno.yml | 55 +++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/deploy-deno.yml diff --git a/.github/workflows/deploy-deno.yml b/.github/workflows/deploy-deno.yml new file mode 100644 index 00000000..5c8d2627 --- /dev/null +++ b/.github/workflows/deploy-deno.yml @@ -0,0 +1,55 @@ +name: Deploy into deno deploy + +on: + push: + branches: + - master + paths: + - "client/web/**" + - "client/shared/**" + - "client/packages/design/**" + workflow_dispatch: + +jobs: + deploy: + name: Deploy deno + runs-on: ubuntu-latest + + permissions: + id-token: write # Needed for auth with Deno Deploy + contents: read # Needed to clone the repository + + steps: + - name: Clone repository + uses: actions/checkout@v3 + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: lts/* + + - name: Cache pnpm modules + uses: actions/cache@v2 + with: + path: ~/.pnpm-store + key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}- + - uses: pnpm/action-setup@v2.0.1 + with: + version: latest + run_install: false + - name: Install packages + run: pnpm install --frozen-lockfile + + - name: Build step + run: "cd client/web && pnpm build" # 📝 Update the build command(s) if necessary + env: + SERVICE_URL: https://tailchat-nightly.moonrailgun.com + + - name: Upload to Deno Deploy + uses: denoland/deployctl@v1 + with: + project: "tailchat-nightly" + entrypoint: "index.html" + root: "./client/web/dist"