From 7565814c09be1e43fa0b02d0408974c98c942ff9 Mon Sep 17 00:00:00 2001 From: Dhravya Date: Sat, 30 Mar 2024 23:21:38 -0700 Subject: [PATCH] build properly --- .github/actions/buildextension/action.yml | 4 ++-- .github/workflows/build.yml | 21 ++++++++++++++++----- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/actions/buildextension/action.yml b/.github/actions/buildextension/action.yml index 19e547f0..638fa6aa 100644 --- a/.github/actions/buildextension/action.yml +++ b/.github/actions/buildextension/action.yml @@ -19,11 +19,11 @@ runs: - name: Pack extension working-directory: apps/extension/dist - run: zip -r ../../extension-${{ github.sha }}.zip * + run: zip -r extension-${{ github.sha }}.zip * shell: bash - name: Upload extension archive uses: actions/upload-artifact@v3 with: name: extension-${{ github.sha }} - path: extension-${{ github.sha }}.zip + path: apps/extensions/dist/extension-${{ github.sha }}.zip diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f6a64de6..8bc1467e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,10 +23,21 @@ jobs: with: bun-version: latest - - name: Deploy to Cloudflare Workers with Wrangler - uses: cloudflare/wrangler-action@v3.4.1 + - name: Install packages + run: bun i + shell: bash + + - name: Build app + run: bun run build + working-directory: apps/web + shell: bash + + - name: Publish to Cloudflare Pages + uses: cloudflare/pages-action@v1 with: apiToken: ${{ secrets.CF_API_TOKEN }} - packageManager: bun - workingDirectory: apps/web - command: bun run build \ No newline at end of file + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }} + directory: apps/web/.vercel/output/static + gitHubToken: ${{ secrets.GITHUB_TOKEN }} + branch: main