diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml index 720b7fa3..f9fb46c8 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-prod.yml @@ -20,7 +20,7 @@ jobs: uses: lewagon/wait-on-check-action@v1.3.4 with: ref: ${{ github.ref }} - check-name: 'Lint & Test' + check-name: "Lint & Test" repo-token: ${{ secrets.GITHUB_TOKEN }} build-prod: @@ -46,7 +46,7 @@ jobs: npm run postexport env: # Build-time envs used in next.config.js - NET: 'mainnet' + NET: "mainnet" INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }} ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }} GA4_TAG_ID: ${{ secrets.GA4_TAG_ID }} @@ -79,7 +79,7 @@ jobs: - name: Select target bucket id: bucket run: | - echo "bucket=${S3_BUCKET_PROD}" >> $GITHUB_OUTPUT + echo "bucket=${S3_BUCKET_PROD}" >> $GITHUB_OUTPUT env: S3_BUCKET_PROD: ${{ secrets.S3_BUCKET_PROD }} @@ -89,6 +89,7 @@ jobs: --delete \ --exclude "*" \ --include "_next/*" \ + --include "static/*" \ --cache-control "public, max-age=31536000, immutable" - name: Sync HTML and other assets with no-cache @@ -96,13 +97,14 @@ jobs: aws s3 sync $BUILD_DIR s3://${{ steps.bucket.outputs.bucket }} \ --delete \ --exclude "_next/*" \ + --exclude "static/*" \ --cache-control "no-cache, no-store, must-revalidate" - name: Invalidate CloudFront env: - CLOUDFRONT_DISTRIBUTION_ID_PROD: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID_PROD }} - if: ${{ env.CLOUDFRONT_DISTRIBUTION_ID_PROD != '' }} + CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} + if: ${{ env.CLOUDFRONT_DISTRIBUTION_ID != '' }} run: | aws cloudfront create-invalidation \ - --distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID_PROD }} \ + --distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} \ --paths "/*" diff --git a/src/components/tests/dns-registry-verified.spec.js b/src/components/tests/dns-registry-verified.spec.js index 7479648c..100cac9c 100644 --- a/src/components/tests/dns-registry-verified.spec.js +++ b/src/components/tests/dns-registry-verified.spec.js @@ -14,7 +14,7 @@ const StatusButton = Selector("#certificate-status"); test("Sample document is rendered correctly when dns and registry is verified", async (t) => { await t.setFilesToUpload("input[type=file]", [Document]); - await validateTextContent(t, StatusButton, ["SEPOLIA: GOVERNMENT TECHNOLOGY AGENCY OF SINGAPORE (GOVTECH)"]); + await validateTextContent(t, StatusButton, ["SEPOLIA: OPENCERTS"]); await t.switchToIframe(IframeBlock); diff --git a/src/components/tests/download-certificate.spec.js b/src/components/tests/download-certificate.spec.js index 61b84242..b06e1181 100644 --- a/src/components/tests/download-certificate.spec.js +++ b/src/components/tests/download-certificate.spec.js @@ -72,10 +72,7 @@ test("Sample document with special characters is downloaded correctly", async (t await enableDownloadForHeadlessChrome(t); await t.setFilesToUpload("input[type=file]", [Document2]); - await validateTextContent(t, StatusButton, [ - "DEMO-OPENCERTS.OPENATTESTATION.COM", - "SEPOLIA: GOVERNMENT TECHNOLOGY AGENCY OF SINGAPORE (GOVTECH)", - ]); + await validateTextContent(t, StatusButton, ["DEMO-OPENCERTS.OPENATTESTATION.COM", "SEPOLIA: OPENCERTS"]); // Simulate an OpenCert file download const fileName = await DownloadLink.getAttribute("download"); diff --git a/src/components/tests/load-action-encrypted-certificate.spec.js b/src/components/tests/load-action-encrypted-certificate.spec.js index 63198fbd..0040de6d 100644 --- a/src/components/tests/load-action-encrypted-certificate.spec.js +++ b/src/components/tests/load-action-encrypted-certificate.spec.js @@ -28,7 +28,7 @@ test("Load OA v2.0 document from action should work when action is valid (key fr await t.navigateTo( `http://localhost:3000/?q=${encodeURI(JSON.stringify(action))}#${encodeURI(JSON.stringify(anchor))}` ); - await validateTextContent(t, StatusButton, ["SEPOLIA: GOVERNMENT TECHNOLOGY AGENCY OF SINGAPORE (GOVTECH)"]); + await validateTextContent(t, StatusButton, ["SEPOLIA: OPENCERTS"]); await t.switchToIframe(IframeBlock); @@ -79,7 +79,7 @@ test("Load document from action should work when action is valid (key from query }; await t.navigateTo(`http://localhost:3000/?q=${encodeURI(JSON.stringify(action))}`); - await validateTextContent(t, StatusButton, ["SEPOLIA: GOVERNMENT TECHNOLOGY AGENCY OF SINGAPORE (GOVTECH)"]); + await validateTextContent(t, StatusButton, ["SEPOLIA: OPENCERTS"]); await t.switchToIframe(IframeBlock); diff --git a/src/components/tests/load-action-plain-certificate.spec.js b/src/components/tests/load-action-plain-certificate.spec.js index a5699bc3..6fbd848a 100644 --- a/src/components/tests/load-action-plain-certificate.spec.js +++ b/src/components/tests/load-action-plain-certificate.spec.js @@ -22,7 +22,7 @@ test("Load document from action should work when url is valid (OA v2.0)", async }; await t.navigateTo(`http://localhost:3000/?q=${encodeURI(JSON.stringify(action))}`); - await validateTextContent(t, StatusButton, ["SEPOLIA: GOVERNMENT TECHNOLOGY AGENCY OF SINGAPORE (GOVTECH)"]); + await validateTextContent(t, StatusButton, ["SEPOLIA: OPENCERTS"]); await t.switchToIframe(IframeBlock); diff --git a/src/components/tests/multi-dns-verified-certificate-store.spec.js b/src/components/tests/multi-dns-verified-certificate-store.spec.js index 82da34e3..3bf2dc6f 100644 --- a/src/components/tests/multi-dns-verified-certificate-store.spec.js +++ b/src/components/tests/multi-dns-verified-certificate-store.spec.js @@ -15,7 +15,7 @@ const StatusButton = Selector("#certificate-status"); test("Sample document is rendered correctly when multiple dns is verified", async (t) => { await t.setFilesToUpload("input[type=file]", [Document]); - await validateTextContent(t, StatusButton, ["SEPOLIA: GOVERNMENT TECHNOLOGY AGENCY OF SINGAPORE (GOVTECH)"]); + await validateTextContent(t, StatusButton, ["SEPOLIA: OPENCERTS"]); await t.switchToIframe(IframeBlock); diff --git a/src/components/tests/multi-dns-verified.spec.js b/src/components/tests/multi-dns-verified.spec.js index 132cbda4..92cdf9d3 100644 --- a/src/components/tests/multi-dns-verified.spec.js +++ b/src/components/tests/multi-dns-verified.spec.js @@ -14,7 +14,7 @@ const StatusButton = Selector("#certificate-status"); test("Sample document is rendered correctly when multiple dns is verified", async (t) => { await t.setFilesToUpload("input[type=file]", [Document]); - await validateTextContent(t, StatusButton, ["SEPOLIA: GOVERNMENT TECHNOLOGY AGENCY OF SINGAPORE (GOVTECH)"]); + await validateTextContent(t, StatusButton, ["SEPOLIA: OPENCERTS"]); await t.switchToIframe(IframeBlock); diff --git a/src/components/tests/multi-registry-verified.spec.js b/src/components/tests/multi-registry-verified.spec.js index 678babb2..9a6c8991 100644 --- a/src/components/tests/multi-registry-verified.spec.js +++ b/src/components/tests/multi-registry-verified.spec.js @@ -12,5 +12,5 @@ const StatusButton = Selector("#certificate-status"); test("Sample document is rendered correctly when multiple registry is verified", async (t) => { await t.setFilesToUpload("input[type=file]", [Document]); - await validateTextContent(t, StatusButton, ["SEPOLIA: GOVERNMENT TECHNOLOGY AGENCY OF SINGAPORE (GOVTECH)"]); + await validateTextContent(t, StatusButton, ["SEPOLIA: OPENCERTS"]); }); diff --git a/src/components/tests/obfuscated-document-verified.spec.js b/src/components/tests/obfuscated-document-verified.spec.js index 5e44c4b5..e05c04b5 100644 --- a/src/components/tests/obfuscated-document-verified.spec.js +++ b/src/components/tests/obfuscated-document-verified.spec.js @@ -15,7 +15,7 @@ const ObfuscationNote = Selector("#obfuscation-note"); test("Sample document is rendered correctly when single registry is verified", async (t) => { await t.setFilesToUpload("input[type=file]", [Document]); - await validateTextContent(t, StatusButton, ["SEPOLIA: GOVERNMENT TECHNOLOGY AGENCY OF SINGAPORE (GOVTECH)"]); + await validateTextContent(t, StatusButton, ["SEPOLIA: OPENCERTS"]); await validateTextContent(t, ObfuscationNote, [ "The owner of this certificate have chosen not to share certain information in the certificate with you. Please note that this does not affect the authenticity of the certificate.", diff --git a/src/components/tests/registry-verified.spec.js b/src/components/tests/registry-verified.spec.js index eff6f94a..595d5aea 100644 --- a/src/components/tests/registry-verified.spec.js +++ b/src/components/tests/registry-verified.spec.js @@ -16,7 +16,7 @@ const SampleTemplate = Selector("#rendered-certificate"); test("Sample document is rendered correctly when single registry is verified", async (t) => { await t.setFilesToUpload("input[type=file]", [Document]); - await validateTextContent(t, StatusButton, ["SEPOLIA: GOVERNMENT TECHNOLOGY AGENCY OF SINGAPORE (GOVTECH)"]); + await validateTextContent(t, StatusButton, ["SEPOLIA: OPENCERTS"]); await t.switchToIframe(IframeBlock); diff --git a/src/components/tests/verified-unverified-issuer.spec.js b/src/components/tests/verified-unverified-issuer.spec.js index 54a84cab..1e67c913 100644 --- a/src/components/tests/verified-unverified-issuer.spec.js +++ b/src/components/tests/verified-unverified-issuer.spec.js @@ -16,7 +16,7 @@ const StatusButton = Selector("#certificate-status"); test("Sample doc is rendered correctly when any one of dns or registry is verified and doc store mismatch in domain", async (t) => { await t.setFilesToUpload("input[type=file]", [Document]); - await validateTextContent(t, StatusButton, ["SEPOLIA: GOVERNMENT TECHNOLOGY AGENCY OF SINGAPORE (GOVTECH)"]); + await validateTextContent(t, StatusButton, ["SEPOLIA: OPENCERTS"]); await t.switchToIframe(IframeBlock); diff --git a/src/sagas/sagatests/integration-server-error.spec.js b/src/sagas/sagatests/integration-server-error.spec.js index 2670c876..c05a4f85 100644 --- a/src/sagas/sagatests/integration-server-error.spec.js +++ b/src/sagas/sagatests/integration-server-error.spec.js @@ -41,7 +41,7 @@ test.requestHooks(badGatewayMockInfuraOnly)( async (t) => { await t.setFilesToUpload("input[type=file]", [Certificate2]); - await validateTextContent(t, StatusButton, ["SEPOLIA: GOVERNMENT TECHNOLOGY AGENCY OF SINGAPORE (GOVTECH)"]); + await validateTextContent(t, StatusButton, ["SEPOLIA: OPENCERTS"]); await t.switchToIframe(IframeBlock);