Skip to content

Commit

Permalink
Fix Github workflows and docusaurus config
Browse files Browse the repository at this point in the history
  • Loading branch information
fongsean committed Jul 10, 2024
1 parent c48bb08 commit 20548a7
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 66 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/build_test_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
64 changes: 0 additions & 64 deletions .github/workflows/deploy_docs.yml

This file was deleted.

1 change: 1 addition & 0 deletions documentation/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 3 additions & 2 deletions documentation/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 20548a7

Please sign in to comment.