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-prod.yml b/.github/workflows/deploy-website-prod.yml new file mode 100644 index 0000000..9c858db --- /dev/null +++ b/.github/workflows/deploy-website-prod.yml @@ -0,0 +1,56 @@ +name: Build and Deploy Website to S3 (Prod) + +on: + workflow_dispatch: + +concurrency: + group: website-s3-prod-${{ github.ref }} + cancel-in-progress: true + +jobs: + build-deploy: + name: Build and Deploy (Prod) + 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 "${{ env.CLOUDFRONT_DISTRIBUTION_ID }}" \ + --paths "/*" diff --git a/docs/help/faq.md b/docs/help/faq.md index 8ffe364..fcf6a9a 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/692580cf75241c91db4ef3da) 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.