diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 69720a1..7503c32 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,6 +15,8 @@ jobs: - uses: ./.github/actions/setup - run: GOOS=js GOARCH=wasm go build -o ./static/main.wasm . - run: npx vite build + env: + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - run: npx tsx build.ts working-directory: packages/functions - uses: google-github-actions/auth@v2 diff --git a/vite.config.mts b/vite.config.mts index 4416f08..e2e7a2a 100644 --- a/vite.config.mts +++ b/vite.config.mts @@ -1,4 +1,5 @@ /* eslint-disable import/no-extraneous-dependencies */ +import { sentryVitePlugin } from "@sentry/vite-plugin" import react from "@vitejs/plugin-react" import { defineConfig } from "vite" @@ -11,5 +12,13 @@ export default defineConfig({ react({ jsxImportSource: "@emotion/react", }), + process.env["CI"] && + sentryVitePlugin({ + org: "shujikoike", + project: "csgo", + }), ], + build: { + sourcemap: !!process.env["CI"], + }, })