diff --git a/.env b/.env index b6dd15fe93..7ec61e60b2 100644 --- a/.env +++ b/.env @@ -1,3 +1,3 @@ PUBLIC_URL=/ REACT_APP_PUBLIC_URL=/ -REACT_APP_VERSION=$npm_package_version +REACT_APP_VERSION=$npm_package_version diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 2fe1a4ffc8..d9314b2a11 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -2,14 +2,14 @@ name: Continuous Integration on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ main ] + branches: [main] merge_group: types: [checks_requested] workflow_run: workflows: ["Package"] - branches: [ main ] + branches: [main] types: - completed @@ -39,7 +39,7 @@ jobs: - uses: actions/setup-go@v3 with: - go-version: '^1.18' + go-version: "^1.18" - name: Build server working-directory: ./server @@ -62,13 +62,12 @@ jobs: needs: test uses: inovex/scrumlr.io/.github/workflows/package.yml@main - deploy_to_dev_cluster: needs: package if: ${{ github.event_name == 'pull_request' && github.event.pull_request.user.login != 'dependabot[bot]' }} uses: inovex/scrumlr.io/.github/workflows/deploy_to_dev_cluster.yml@main secrets: inherit - with: + with: frontend_image_tag: ${{ needs.package.outputs.frontend-image-tag }} server_image_tag: ${{ needs.package.outputs.server-image-tag }} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 897c984c19..2b91776a65 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -67,9 +67,8 @@ jobs: name: Deploy Feature Branch runs-on: self-hosted if: "${{ (github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request' && github.event.label.name == 'Action: Deploy PR') || (github.event.action == 'labeled' && github.event.label.name == 'Action: Deploy PR')}}" - needs: [ build-frontend, build-server ] + needs: [build-frontend, build-server] steps: - - name: checkout repository uses: actions/checkout@v2 @@ -105,4 +104,3 @@ jobs: helm uninstall scrumlr-main --namespace scrumlr-main --wait helm dep up deployment/chart/ helm install scrumlr-main ./deployment/chart -f ./deployment/chart/env/dev.yaml --namespace scrumlr-main - diff --git a/src/index.tsx b/src/index.tsx index 8bdf89dd00..7f63e22ee6 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -13,7 +13,8 @@ import {Actions} from "store/action"; import {Html} from "components/Html"; import {APP_VERSION_STORAGE_KEY} from "constants/storage"; import {saveToStorage} from "utils/storage"; -// import * as serviceWorkerRegistration from "./serviceWorkerRegistration"; +import {register} from "serviceWorkerRegistration"; + import {SHOW_LEGAL_DOCUMENTS} from "./config"; import "react-tooltip/dist/react-tooltip.css"; @@ -40,5 +41,4 @@ root.render( ); store.dispatch(Actions.initApplication()); -// Disable the service worker for now since there are known issues where our third party authentication services cannot be used -// serviceWorkerRegistration.register(); +register(); diff --git a/src/service-worker.ts b/src/service-worker.ts index a47a96ad07..87e832ca3f 100644 --- a/src/service-worker.ts +++ b/src/service-worker.ts @@ -21,20 +21,17 @@ registerRoute( // Return false to exempt requests from being fulfilled by index.html. ({request, url}: {request: Request; url: URL}) => { // If this isn't a navigation, skip. - if (request.mode !== "navigate") { - return false; - } + if (request.mode !== "navigate") return false; // If this is a URL that starts with /_, skip. - if (url.pathname.startsWith("/_")) { - return false; - } + if (url.pathname.startsWith("/_")) return false; // If this looks like a URL for a resource, because it contains // a file extension, skip. - if (url.pathname.match(fileExtensionRegexp)) { - return false; - } + if (url.pathname.match(fileExtensionRegexp)) return false; + + // if this URL is a login provider URL, skip + if (url.pathname.includes("/api/login/")) return false; // Return true to signal that we want to use the handler. return true;