Skip to content

Commit

Permalink
Fixes loading sentry auth token during build
Browse files Browse the repository at this point in the history
  • Loading branch information
a-poor committed Jan 4, 2025
1 parent 8e1520c commit 57f7a21
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ jobs:
cache: 'npm'
- run: npm ci
- run: npm run build
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
- run: npx wrangler deploy
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_KEY }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
8 changes: 1 addition & 7 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ import readingTime from 'reading-time';
import { sentryVitePlugin } from "@sentry/vite-plugin";


const SENTRY_AUTH_TOKEN = process.env.SENTRY_AUTH_TOKEN;
if (!SENTRY_AUTH_TOKEN) {
console.error('SENTRY_AUTH_TOKEN environment variable is required');
}


function importBlogPostPlugin() {
const virtualModuleId = 'virtual:load-blog-posts';
const resolvedVirtualModuleId = '\0' + virtualModuleId;
Expand Down Expand Up @@ -116,7 +110,7 @@ export default defineConfig(({ isSsrBuild }) => ({

// Keep this at the end
sentryVitePlugin({
authToken: SENTRY_AUTH_TOKEN,
authToken: process.env.SENTRY_AUTH_TOKEN,
org: "austinpoorcom",
project: "austinpoor-dot-com",
sourcemaps: {
Expand Down

0 comments on commit 57f7a21

Please sign in to comment.