Skip to content

Commit

Permalink
chore(ci): add sentry sourcemaps (#4)
Browse files Browse the repository at this point in the history
* chore: Update .env.production

* Update .env.development

* Update deploy.yml

* Update deploy.yml

* Update deploy.yml

* Update deploy.yml

* Update deploy.yml

* Update deploy.yml

* Update deploy.yml

* Update next.config.mjs

* Update csp.config.mjs

* Update deploy.yml
  • Loading branch information
revolunet authored May 30, 2024
1 parent cc6af48 commit 387920c
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ NEXT_TELEMETRY_DISABLED=1
NEXT_PUBLIC_SITE_URL=""
NEXT_PUBLIC_SENTRY_DSN="https://xxx/yy"
NEXT_PUBLIC_SENTRY_ENV="dev"
NEXT_PUBLIC_MATOMO_URL="https://stats.beta.gouv.fr"
NEXT_PUBLIC_MATOMO_SITE_ID="1"
NEXT_PUBLIC_APP_REPOSITORY_URL="https://github.com/betagouv/template"
NEXT_PUBLIC_MATOMO_URL=""
NEXT_PUBLIC_MATOMO_SITE_ID=""
NEXT_PUBLIC_APP_REPOSITORY_URL="https://github.com/betagouv/template-nextjs"
NEXT_PUBLIC_BASE_PATH=/template-nextjs
8 changes: 4 additions & 4 deletions .env.production
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
NEXT_TELEMETRY_DISABLED=1
NEXT_PUBLIC_SITE_URL="https://template.beta.gouv.fr/"
NEXT_PUBLIC_SENTRY_DSN="https://xxx/yy"
NEXT_PUBLIC_SENTRY_DSN="https://5097055d921644e7b8899c37d9e90780@sentry.incubateur.net/159"
NEXT_PUBLIC_SENTRY_ENV="production"
NEXT_PUBLIC_MATOMO_URL="https:/stats.beta.gouv.fr"
NEXT_PUBLIC_MATOMO_SITE_ID=63
NEXT_PUBLIC_APP_REPOSITORY_URL="https://github.com/betagouv/template"
NEXT_PUBLIC_MATOMO_URL="https://stats.beta.gouv.fr"
NEXT_PUBLIC_MATOMO_SITE_ID=124
NEXT_PUBLIC_APP_REPOSITORY_URL="https://github.com/betagouv/template-nextjs"
PRODUCTION=true
NEXT_PUBLIC_BASE_PATH=/template-nextjs
8 changes: 8 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ jobs:
yarn --immutable
- name: Build
env:
NODE_ENV: production # JS build mode
PRODUCTION: true # for environment (ex: robots.txt)
SENTRY_URL: https://sentry.incubateur.net
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: betagouv
SENTRY_PROJECT: template-nextjs
SENTRY_RELEASE_UPLOAD: true
run: |
yarn build
touch out/.nojekyll
Expand Down
1 change: 1 addition & 0 deletions csp.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const ContentSecurityPolicy = `
script-src 'self' *.gouv.fr ${
process.env.NODE_ENV !== "production" && "'unsafe-eval' 'unsafe-inline'"
};
connect-src 'self' *.gouv.fr https://sentry.incubateur.net;
frame-src 'self' *.gouv.fr;
style-src 'self' 'unsafe-inline';
font-src 'self' data: blob:;
Expand Down
4 changes: 2 additions & 2 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ const moduleExports = {
return config;
},
sentry: {
disableClientWebpackPlugin: true,
disableServerWebpackPlugin: true,
//disableClientWebpackPlugin: true,
//disableServerWebpackPlugin: true,
},
env: {
NEXT_PUBLIC_APP_VERSION: version,
Expand Down

0 comments on commit 387920c

Please sign in to comment.