From 09ff9ae0e6dd70fa5215053c05780340d254dee9 Mon Sep 17 00:00:00 2001 From: Nudesuppe42 Date: Wed, 21 Aug 2024 22:21:32 +0200 Subject: [PATCH] ci(main): :rocket: Change envs for CI --- .github/workflows/main.yml | 3 ++ next.config.js | 57 ++++++++++++++++++-------------------- src/utils/Sitemap.ts | 2 +- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 496759b3..525a6229 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,6 +8,8 @@ jobs: build: runs-on: ubuntu-latest + env: + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} steps: - uses: actions/checkout@v4 - name: Docker login @@ -24,6 +26,7 @@ jobs: echo NEXT_PUBLIC_API_URL="https://api.buildtheearth.net/api/v1" >> build.env.local echo NEXT_PUBLIC_MAPBOX_TOKEN="${{ secrets.MAPBOX_TOKEN }}" >> build.env.local echo PORT=3000 >> build.env.local + echo SENTRY_AUTH_TOKEN="${{ secrets.SENTRY_AUTH_TOKEN }}" >> build.env.local - name: Build the Docker image run: docker build . --file Dockerfile --tag ghcr.io/buildtheearth/website-frontend:$(git rev-parse --short HEAD) --tag ghcr.io/buildtheearth/website-frontend:latest diff --git a/next.config.js b/next.config.js index 7066adec..5adfcf75 100644 --- a/next.config.js +++ b/next.config.js @@ -111,41 +111,38 @@ module.exports = withBundleAnalyzer(nextConfig); const { withSentryConfig } = require("@sentry/nextjs"); -module.exports = withSentryConfig( - module.exports, - { - // For all available options, see: - // https://github.com/getsentry/sentry-webpack-plugin#options +module.exports = withSentryConfig(module.exports, { + // For all available options, see: + // https://github.com/getsentry/sentry-webpack-plugin#options - org: "buildtheearth", - project: "main-website", - sentryUrl: "https://sentry.buildtheearth.net/", + org: 'buildtheearth', + project: 'main-website', + sentryUrl: 'https://sentry.buildtheearth.net', - // Only print logs for uploading source maps in CI - silent: !process.env.CI, + // Only print logs for uploading source maps in CI + silent: !process.env.CI, - // For all available options, see: - // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/ + // For all available options, see: + // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/ - // Upload a larger set of source maps for prettier stack traces (increases build time) - widenClientFileUpload: true, + // Upload a larger set of source maps for prettier stack traces (increases build time) + widenClientFileUpload: true, - // Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers. - // This can increase your server load as well as your hosting bill. - // Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client- - // side errors will fail. - tunnelRoute: "/monitoring", + // Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers. + // This can increase your server load as well as your hosting bill. + // Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client- + // side errors will fail. + tunnelRoute: '/monitoring', - // Hides source maps from generated client bundles - hideSourceMaps: true, + // Hides source maps from generated client bundles + hideSourceMaps: true, - // Automatically tree-shake Sentry logger statements to reduce bundle size - disableLogger: true, + // Automatically tree-shake Sentry logger statements to reduce bundle size + disableLogger: true, - // Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.) - // See the following for more information: - // https://docs.sentry.io/product/crons/ - // https://vercel.com/docs/cron-jobs - automaticVercelMonitors: false, - } -); + // Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.) + // See the following for more information: + // https://docs.sentry.io/product/crons/ + // https://vercel.com/docs/cron-jobs + automaticVercelMonitors: false, +}); diff --git a/src/utils/Sitemap.ts b/src/utils/Sitemap.ts index 2254cd07..8ec4e2d6 100644 --- a/src/utils/Sitemap.ts +++ b/src/utils/Sitemap.ts @@ -16,7 +16,7 @@ export function generateSiteMapContent( ${d.lastModified.toISOString().split('T')[0]} ${nextConfig.i18n?.locales .map( - (locale) => + (locale: string) => ` `, ) .join('')}