Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/deploy-website-dev.yml
Original file line number Diff line number Diff line change
@@ -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 "/*"
56 changes: 56 additions & 0 deletions .github/workflows/deploy-website-prod.yml
Original file line number Diff line number Diff line change
@@ -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 "/*"
4 changes: 4 additions & 0 deletions docs/help/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion website/core/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class Footer extends React.Component {
height="45"
/>
</a>
{/* <section className="copyright">{this.props.config.copyright}</section> */}
<section className="copyright">{this.props.config.copyright}</section>
</footer>
);
}
Expand Down
2 changes: 1 addition & 1 deletion website/siteConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down