diff --git a/infrastructure/aws-cdk/lib/components/front-end.ts b/infrastructure/aws-cdk/lib/components/front-end.ts index 825a714c7..504bc1d38 100644 --- a/infrastructure/aws-cdk/lib/components/front-end.ts +++ b/infrastructure/aws-cdk/lib/components/front-end.ts @@ -177,9 +177,8 @@ export class FaimsFrontEnd extends Construct { "-c", ` cd /asset-input - npm i + "npm i && npm run github-build-app", cd ${appPath} - ./${buildScript} cp -R ${outputPath}/* /asset-output `, ], @@ -202,9 +201,8 @@ export class FaimsFrontEnd extends Construct { //export environment variables - not included by default envs, `cd ${buildPath}`, - "npm i", + "npm i && npm run github-build-app", `cd ${appPath}`, - `./${buildScript}`, `cp -R ${outputPath}/* ${outputDir}`, ]; console.log(commands); @@ -306,7 +304,6 @@ export class FaimsFrontEnd extends Construct { "-c", ` cd /asset-input - npm i cd ${appPath} ./${buildScript} cp -R ${outputPath}/* /asset-output @@ -322,7 +319,6 @@ export class FaimsFrontEnd extends Construct { const exec = require("child_process").execSync; const commands = [ `cd ${buildPath}`, - "npm i", `cd ${appPath}`, `./${buildScript}`, `cp -R ${outputPath}/* ${outputDir}`, diff --git a/package.json b/package.json index 3006e8705..6af676956 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "scripts": { "build-app": "npm run build --workspace=app", "build-api": "npm run build --workspace=api", + "github-build-app": "npm run build --workspace=library/data-model --workspace=app", "docker-build-api": "npm run build --workspace=library/data-model --workspace=api", "build-aws": "npm run build --workspace=infrastructure/aws-cdk", "package-aws": "npm run package --workspace=infrastructure/aws-cdk",