From daffd1355fac6697c776203b80317519ca81308d Mon Sep 17 00:00:00 2001 From: Michael Gamlem III Date: Mon, 24 Apr 2023 19:14:59 -0700 Subject: [PATCH] Add sourcemaps to rollbar on deploy --- .github/workflows/release.yml | 16 ++++++++++++++-- .vscode/settings.json | 1 + vite.config.ts | 1 + 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4681bc91..5942cc6c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,19 +39,31 @@ jobs: run: yarn build - name: Setup Pages uses: actions/configure-pages@v3 - - name: Upload artifact + - name: Upload GitHub Pages artifact uses: actions/upload-pages-artifact@v1 with: - path: "./dist" + path: | + ./dist + !./dist/*.map + - name: Upload Source Maps + uses: actions/upload-artifact@v3 + with: + name: sourcemaps + path: "./dist/*.map" - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v2 + - name: Download Sourcemaps + uses: actions/download-artifact@v3 + with: + name: sourcemaps - name: Notify deploy to Rollbar uses: rollbar/github-deploy-action@2.1.2 id: rollbar_deploy with: environment: "production" version: ${{ github.sha }} + source_maps: sourcemaps env: ROLLBAR_ACCESS_TOKEN: ${{ secrets.ROLLBAR_ACCESS_TOKEN }} ROLLBAR_USERNAME: ${{ github.actor }} diff --git a/.vscode/settings.json b/.vscode/settings.json index 3164401b..296f70cc 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -81,6 +81,7 @@ "skipcq", "Slaad", "Snilloc's", + "sourcemaps", "spellcasters", "spellcasting", "Stirge", diff --git a/vite.config.ts b/vite.config.ts index 1491117c..78f80652 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -34,6 +34,7 @@ export default defineConfig({ "@ag-grid-community/client-side-row-model", ], }, + sourcemap: true, assetFileNames: "[hash].g.[ext]", chunkFileNames: "[hash].g.js", banner: "/*! Copyright © 2023 Michael Gamlem III | github.com/mg3-codes | github.com/mgamlem3 | MIT License applies to code | CC-BY-4.0 applies to D&D content **/",