From b00e0b3ad26bb72d30f472e033501e918226b64b Mon Sep 17 00:00:00 2001 From: isaackps Date: Wed, 24 Sep 2025 11:53:27 +0800 Subject: [PATCH 1/7] fix: add CI to deploy to S3 --- .github/workflows/deploy-website-s3.yml | 63 +++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/deploy-website-s3.yml diff --git a/.github/workflows/deploy-website-s3.yml b/.github/workflows/deploy-website-s3.yml new file mode 100644 index 0000000..4064715 --- /dev/null +++ b/.github/workflows/deploy-website-s3.yml @@ -0,0 +1,63 @@ +name: Build and Deploy Website to S3 + +on: + push: + branches: + - imda + paths: + - 'website/**' + - 'docs/**' + - 'legacy/**' + workflow_dispatch: + +concurrency: + group: website-s3-${{ github.ref }} + cancel-in-progress: true + +jobs: + build-deploy: + name: Build and Deploy + runs-on: ubuntu-latest + defaults: + run: + working-directory: website + permissions: + contents: read + # id-token: write # Uncomment if switching to OIDC/role assumption instead of access keys + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '18' + cache: 'npm' + cache-dependency-path: website/package-lock.json + + - name: Install dependencies + run: npm ci + + - name: Build website + run: npm run build + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.AWS_REGION }} + + - name: Sync build to S3 + run: | + aws s3 sync 'build/opencerts-documentation' "s3://${{ secrets.S3_BUCKET }}/" --delete + + - name: Invalidate CloudFront (optional) + env: + CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} + if: ${{ env.CLOUDFRONT_DISTRIBUTION_ID != '' }} + run: | + aws cloudfront create-invalidation \ + --distribution-id "${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}" \ + --paths "/*" From 91574a9d18eb6ee42727f6e2337702e4a690ee63 Mon Sep 17 00:00:00 2001 From: isaackps Date: Wed, 24 Sep 2025 11:56:50 +0800 Subject: [PATCH 2/7] fix: update yml --- .github/workflows/deploy-website-s3.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy-website-s3.yml b/.github/workflows/deploy-website-s3.yml index 4064715..67a2a2b 100644 --- a/.github/workflows/deploy-website-s3.yml +++ b/.github/workflows/deploy-website-s3.yml @@ -5,9 +5,9 @@ on: branches: - imda paths: - - 'website/**' - - 'docs/**' - - 'legacy/**' + - "website/**" + - "docs/**" + - "legacy/**" workflow_dispatch: concurrency: @@ -32,8 +32,8 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: '18' - cache: 'npm' + node-version: "18" + cache: "npm" cache-dependency-path: website/package-lock.json - name: Install dependencies @@ -54,10 +54,10 @@ jobs: aws s3 sync 'build/opencerts-documentation' "s3://${{ secrets.S3_BUCKET }}/" --delete - name: Invalidate CloudFront (optional) - env: + env: CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} if: ${{ env.CLOUDFRONT_DISTRIBUTION_ID != '' }} run: | aws cloudfront create-invalidation \ - --distribution-id "${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}" \ + --distribution-id "${{ env.CLOUDFRONT_DISTRIBUTION_ID }}" \ --paths "/*" From 4b111292c4836e156b9bea607e437d41abe90083 Mon Sep 17 00:00:00 2001 From: isaackps Date: Wed, 24 Sep 2025 12:01:59 +0800 Subject: [PATCH 3/7] fix: update yml --- .github/workflows/deploy-website-s3.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy-website-s3.yml b/.github/workflows/deploy-website-s3.yml index 67a2a2b..cd9523b 100644 --- a/.github/workflows/deploy-website-s3.yml +++ b/.github/workflows/deploy-website-s3.yml @@ -17,6 +17,7 @@ concurrency: jobs: build-deploy: name: Build and Deploy + if: github.event_name == 'push' runs-on: ubuntu-latest defaults: run: From cd7df22eff0c7bf4476cd83b736b8925197b514b Mon Sep 17 00:00:00 2001 From: isaackps Date: Wed, 24 Sep 2025 12:07:04 +0800 Subject: [PATCH 4/7] fix: trigger workflow --- .github/workflows/deploy-website-s3.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/deploy-website-s3.yml b/.github/workflows/deploy-website-s3.yml index cd9523b..67a2a2b 100644 --- a/.github/workflows/deploy-website-s3.yml +++ b/.github/workflows/deploy-website-s3.yml @@ -17,7 +17,6 @@ concurrency: jobs: build-deploy: name: Build and Deploy - if: github.event_name == 'push' runs-on: ubuntu-latest defaults: run: From 03e8693b624aea1edccbabb17b2843de5ab99284 Mon Sep 17 00:00:00 2001 From: isaackps Date: Wed, 24 Sep 2025 12:13:20 +0800 Subject: [PATCH 5/7] fix: update yml --- .github/workflows/deploy-website-s3.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/deploy-website-s3.yml b/.github/workflows/deploy-website-s3.yml index 67a2a2b..98e8e8d 100644 --- a/.github/workflows/deploy-website-s3.yml +++ b/.github/workflows/deploy-website-s3.yml @@ -6,8 +6,7 @@ on: - imda paths: - "website/**" - - "docs/**" - - "legacy/**" + - ".github/workflows/**" workflow_dispatch: concurrency: From 24499011d29a09b833db3ce16848499582e32860 Mon Sep 17 00:00:00 2001 From: Isaackps Date: Wed, 26 Nov 2025 15:42:31 +0800 Subject: [PATCH 6/7] fix: ci/cd pipeline and link --- .github/workflows/deploy-website-dev.yml | 59 +++++++++++++++++++ ...website-s3.yml => deploy-website-prod.yml} | 12 +--- docs/help/faq.md | 4 ++ website/core/Footer.js | 2 +- website/siteConfig.js | 2 +- 5 files changed, 68 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/deploy-website-dev.yml rename .github/workflows/{deploy-website-s3.yml => deploy-website-prod.yml} (88%) diff --git a/.github/workflows/deploy-website-dev.yml b/.github/workflows/deploy-website-dev.yml new file mode 100644 index 0000000..86ce335 --- /dev/null +++ b/.github/workflows/deploy-website-dev.yml @@ -0,0 +1,59 @@ +name: Build and Deploy Website to S3 (Dev) + +on: + push: + branches: + - develop + workflow_dispatch: + +concurrency: + group: website-s3-dev-${{ github.ref }} + cancel-in-progress: true + +jobs: + build-deploy: + name: Build and Deploy (Dev) + runs-on: ubuntu-latest + defaults: + run: + working-directory: website + permissions: + contents: read + # id-token: write # Uncomment if switching to OIDC/role assumption instead of access keys + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "18" + cache: "npm" + cache-dependency-path: website/package-lock.json + + - name: Install dependencies + run: npm ci + + - name: Build website + run: npm run build + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-access-key-id: ${{ secrets.DEV_AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.DEV_AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.AWS_REGION }} + + - name: Sync build to S3 + run: | + aws s3 sync 'build/opencerts-documentation' "s3://${{ secrets.S3_BUCKET_DEV }}/" --delete + + - name: Invalidate CloudFront (optional) + env: + CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID_DEV }} + if: ${{ env.CLOUDFRONT_DISTRIBUTION_ID != '' }} + run: | + aws cloudfront create-invalidation \ + --distribution-id "${{ env.CLOUDFRONT_DISTRIBUTION_ID }}" \ + --paths "/*" diff --git a/.github/workflows/deploy-website-s3.yml b/.github/workflows/deploy-website-prod.yml similarity index 88% rename from .github/workflows/deploy-website-s3.yml rename to .github/workflows/deploy-website-prod.yml index 98e8e8d..9c858db 100644 --- a/.github/workflows/deploy-website-s3.yml +++ b/.github/workflows/deploy-website-prod.yml @@ -1,21 +1,15 @@ -name: Build and Deploy Website to S3 +name: Build and Deploy Website to S3 (Prod) on: - push: - branches: - - imda - paths: - - "website/**" - - ".github/workflows/**" workflow_dispatch: concurrency: - group: website-s3-${{ github.ref }} + group: website-s3-prod-${{ github.ref }} cancel-in-progress: true jobs: build-deploy: - name: Build and Deploy + name: Build and Deploy (Prod) runs-on: ubuntu-latest defaults: run: diff --git a/docs/help/faq.md b/docs/help/faq.md index 8ffe364..a95e015 100644 --- a/docs/help/faq.md +++ b/docs/help/faq.md @@ -22,3 +22,7 @@ Here you will find a collection of links that may be useful to help you to start - [How does Decentralized Renderer works?](https://github.com/Open-Attestation/adr/blob/master/decentralised_rendering.md) - [How does DNS-TXT identity proof works?](https://github.com/Open-Attestation/adr/blob/master/decentralized_identity_proof_DNS-TXT.md) - [Does OpenCerts verifier follow a specification?](https://github.com/Open-Attestation/adr/blob/master/verifier.md) + +## Implementation Help + +- [Technical Query](https://form.gov.sg/5f27a104fe4c140011c0c544) diff --git a/website/core/Footer.js b/website/core/Footer.js index 799adb3..dd8eec7 100644 --- a/website/core/Footer.js +++ b/website/core/Footer.js @@ -94,7 +94,7 @@ class Footer extends React.Component { height="45" /> - {/*
{this.props.config.copyright}
*/} +
{this.props.config.copyright}
); } diff --git a/website/siteConfig.js b/website/siteConfig.js index 9548d39..0c3d163 100644 --- a/website/siteConfig.js +++ b/website/siteConfig.js @@ -72,7 +72,7 @@ const siteConfig = { */ // This copyright info is used in /core/Footer.js and blog RSS/Atom feeds. - copyright: `Copyright © ${new Date().getFullYear()} Govtech`, + copyright: `Copyright © ${new Date().getFullYear()} OpenCerts`, highlight: { // Highlight.js theme to use for syntax highlighting in code blocks. From 5f69a1b645c7135ed2b987ade5c3cfe66e9c4d7b Mon Sep 17 00:00:00 2001 From: isaackps Date: Wed, 26 Nov 2025 21:57:13 +0800 Subject: [PATCH 7/7] fix: update form link --- docs/help/faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/help/faq.md b/docs/help/faq.md index a95e015..fcf6a9a 100644 --- a/docs/help/faq.md +++ b/docs/help/faq.md @@ -25,4 +25,4 @@ Here you will find a collection of links that may be useful to help you to start ## Implementation Help -- [Technical Query](https://form.gov.sg/5f27a104fe4c140011c0c544) +- [Technical Query](https://form.gov.sg/692580cf75241c91db4ef3da)