diff --git a/.github/workflows/nextjs-bundle-analysis.yml b/.github/workflows/nextjs-bundle-analysis.yml
index 1840f8d380..3cfa1f8573 100644
--- a/.github/workflows/nextjs-bundle-analysis.yml
+++ b/.github/workflows/nextjs-bundle-analysis.yml
@@ -38,12 +38,11 @@ jobs:
path: .next/analyze/__bundle_analysis.json
- name: Download base branch bundle stats
- uses: dawidd6/action-download-artifact@v2
if: success() && github.event.number
- with:
- workflow: nextjs_bundle_analysis.yml
- branch: ${{ github.event.pull_request.base.ref }}
- path: .next/analyze/base
+ run: bash ./scripts/github/download_bundle_analyser_artifact.sh
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
- name: Compare with base branch bundle
if: success() && github.event.number
diff --git a/scripts/github/download_bundle_analyser_artifact.sh b/scripts/github/download_bundle_analyser_artifact.sh
new file mode 100644
index 0000000000..7933256aba
--- /dev/null
+++ b/scripts/github/download_bundle_analyser_artifact.sh
@@ -0,0 +1,29 @@
+set -xe
+ORG="safe-global"
+REPO="safe-wallet-web"
+WORKFLOW="nextjs-bundle-analysis.yml"
+ARTIFACT_NAME="bundle"
+DESTINATION=".next/analyze/base"
+BASE_BRANCH="dev"
+
+ARTIFACTS_URL=$(
+ gh api \
+ -H "Accept: application/vnd.github+json" \
+ -H "X-GitHub-Api-Version: 2022-11-28" \
+ "/repos/${ORG}/${REPO}/actions/workflows/${WORKFLOW}/runs?event=push&branch=${BASE_BRANCH}&status=success&per_page=1" \
+ --jq ".workflow_runs[0].artifacts_url"
+)
+
+DOWNLOAD_URL=$(
+ gh api \
+ -H "Accept: application/vnd.github+json" \
+ -H "X-GitHub-Api-Version: 2022-11-28" \
+ "${ARTIFACTS_URL}" \
+ --jq '.artifacts[] | select(.name == "'"${ARTIFACT_NAME}"'") | .archive_download_url'
+)
+
+set +x
+curl -H "Accept: application/vnd.github+json" -H "Authorization: token $GH_TOKEN" -L -o "${DESTINATION}.zip" "$DOWNLOAD_URL"
+set -x
+unzip "${DESTINATION}.zip" -d "${DESTINATION}" && mkdir -p "${DESTINATION}/bundle" && mv "${DESTINATION}/__bundle_analysis.json" "${DESTINATION}/bundle/"
+rm "${DESTINATION}.zip"
\ No newline at end of file
diff --git a/src/pages/404.tsx b/src/pages/404.tsx
index 60ee9e69b7..54bfb92c9b 100644
--- a/src/pages/404.tsx
+++ b/src/pages/404.tsx
@@ -1,3 +1,4 @@
+import { Typography } from '@mui/material'
import { useEffect, useState } from 'react'
import type { NextPage } from 'next'
import { useRouter } from 'next/router'
@@ -45,7 +46,7 @@ const Custom404: NextPage = () => {
}
}, [router])
- return {!isRedirecting && 404 - Page not found
}
+ return {!isRedirecting && 404 - Page not found}
}
export default Custom404