From 20548a7afba130830e11d8075c5c25a6f98904a8 Mon Sep 17 00:00:00 2001 From: Sean Fong Date: Wed, 10 Jul 2024 17:48:23 +0930 Subject: [PATCH] Fix Github workflows and docusaurus config --- .github/workflows/build_test_lint.yml | 27 ++++++++ .../{deploy_app.yml => deploy_app_docs.yml} | 27 ++++++++ .github/workflows/deploy_docs.yml | 64 ------------------- documentation/docs/index.md | 1 + documentation/docusaurus.config.ts | 5 +- 5 files changed, 58 insertions(+), 66 deletions(-) rename .github/workflows/{deploy_app.yml => deploy_app_docs.yml} (71%) delete mode 100644 .github/workflows/deploy_docs.yml diff --git a/.github/workflows/build_test_lint.yml b/.github/workflows/build_test_lint.yml index ac6840ea..f3a5fd15 100644 --- a/.github/workflows/build_test_lint.yml +++ b/.github/workflows/build_test_lint.yml @@ -79,3 +79,30 @@ jobs: - name: Check formatting run: npm run check-formatting + + deploy-storybook: + name: Deploy Storybook to S3 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js 18.x + uses: actions/setup-node@v4 + with: + node-version: 18 + cache: npm + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: arn:aws:iam::209248795938:role/SmartFormsReactAppDeployment + aws-region: ap-southeast-2 + + - name: Install dependencies + run: npm ci + + - name: Build application + run: npm run build-storybook -w packages/smart-forms-renderer + + - name: Upload static Storybook site to S3 + run: aws s3 sync packages/smart-forms-renderer/storybook-static s3://smart-forms-storybook/storybook diff --git a/.github/workflows/deploy_app.yml b/.github/workflows/deploy_app_docs.yml similarity index 71% rename from .github/workflows/deploy_app.yml rename to .github/workflows/deploy_app_docs.yml index 3a1600fc..92828657 100644 --- a/.github/workflows/deploy_app.yml +++ b/.github/workflows/deploy_app_docs.yml @@ -43,6 +43,33 @@ jobs: - name: Upload static React site to S3 run: aws s3 sync apps/smart-forms-app/dist s3://smart-forms-react-app/ + deploy-docusaurus-s3: + name: Deploy Docusaurus to S3 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js 18.x + uses: actions/setup-node@v4 + with: + node-version: 18 + cache: npm + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: arn:aws:iam::209248795938:role/SmartFormsReactAppDeployment + aws-region: ap-southeast-2 + + - name: Install dependencies + run: npm ci + + - name: Build documentation website + run: npm run build -w documentation + + - name: Upload static Docusaurus site to S3 + run: aws s3 sync documentation/build s3://smart-forms-docs/docs + chromatic: name: Run Chromatic runs-on: ubuntu-latest diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml deleted file mode 100644 index dafee6e6..00000000 --- a/.github/workflows/deploy_docs.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: Smart Forms Docs Deployment Workflow - -on: - push: - -permissions: - contents: read - pages: write - id-token: write - -jobs: - deploy-docusaurus-s3: - name: Deploy Docusaurus to S3 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Use Node.js 18.x - uses: actions/setup-node@v4 - with: - node-version: 18 - cache: npm - - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: arn:aws:iam::209248795938:role/SmartFormsReactAppDeployment - aws-region: ap-southeast-2 - - - name: Install dependencies - run: npm ci - - - name: Build documentation website - run: npm run build -w documentation - - - name: Upload static Docusaurus site to S3 - run: aws s3 sync documentation/build s3://smart-forms-docs/docs - - deploy-storybook: - name: Deploy Storybook to S3 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Use Node.js 18.x - uses: actions/setup-node@v4 - with: - node-version: 18 - cache: npm - - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: arn:aws:iam::209248795938:role/SmartFormsReactAppDeployment - aws-region: ap-southeast-2 - - - name: Install dependencies - run: npm ci - - - name: Build application - run: npm run build-storybook -w packages/smart-forms-renderer - - - name: Upload static Storybook site to S3 - run: aws s3 sync packages/smart-forms-renderer/storybook-static s3://smart-forms-storybook/storybook diff --git a/documentation/docs/index.md b/documentation/docs/index.md index 9dd5222b..b05c1197 100644 --- a/documentation/docs/index.md +++ b/documentation/docs/index.md @@ -14,6 +14,7 @@ This documentation is intended to provide a guide on how to use Smart Forms. It - [Components](/docs/components): A showcase of supported Questionnaire form components. - [SDC](/docs/sdc): A section around the conformance and usage of functionalities defined in the SDC specification. - [Developer Usage](/docs/dev): A guide on how to use the form renderer in your own application. +- [FHIR Operations](/docs/operations): A guide on using the $populate, $assemble and $extract operations. ### Referenced FHIR Specifications diff --git a/documentation/docusaurus.config.ts b/documentation/docusaurus.config.ts index e71ce9c9..e4b7ea52 100644 --- a/documentation/docusaurus.config.ts +++ b/documentation/docusaurus.config.ts @@ -37,11 +37,12 @@ const config: Config = { 'classic', { docs: { + showLastUpdateTime: true, routeBasePath: '/', - sidebarPath: './sidebars.ts', + sidebarPath: './sidebars.ts' // Please change this to your repo. // Remove this to remove the "edit this page" links. - editUrl: 'https://github.com/aehrc/smart-forms/' + // editUrl: 'https://github.com/aehrc/smart-forms/' }, theme: { customCss: './src/css/custom.css'