Skip to content

Commit

Permalink
add env to builds
Browse files Browse the repository at this point in the history
  • Loading branch information
a-type committed May 20, 2024
1 parent 2b7b34e commit 5a326c9
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/deploy-gnocchi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ jobs:

- name: Build gnocchi
run: pnpm --filter @gnocchi.biscuits/web... run build
env:
VITE_API_ORIGIN: ${{ vars.API_ORIGIN }}
VITE_HOME_ORIGIN: ${{ vars.HOME_ORIGIN }}
VITE_PUBLIC_URL: https://gnocchi.biscuits.club

- name: Deploy gnocchi to S3
uses: jakejarvis/s3-sync-action@master
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/deploy-home.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ jobs:

- name: Build site
run: pnpm --filter @biscuits/web... run build
env:
VITE_API_ORIGIN: ${{ vars.API_ORIGIN }}
VITE_HOME_ORIGIN: ${{ vars.HOME_ORIGIN }}
VITE_PUBLIC_URL: https://biscuits.club

- name: Deploy site to S3
uses: jakejarvis/s3-sync-action@master
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/deploy-shopping.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ jobs:

- name: Build shopping
run: pnpm --filter @shopping.biscuits/web... run build
env:
VITE_API_ORIGIN: ${{ vars.API_ORIGIN }}
VITE_HOME_ORIGIN: ${{ vars.HOME_ORIGIN }}
VITE_PUBLIC_URL: https://shopping.biscuits.club

- name: Deploy shopping to S3
uses: jakejarvis/s3-sync-action@master
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/deploy-trip-tick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ jobs:

- name: Build trip-tick
run: pnpm --filter @trip-tick.biscuits/web... run build
env:
VITE_API_ORIGIN: ${{ vars.API_ORIGIN }}
VITE_HOME_ORIGIN: ${{ vars.HOME_ORIGIN }}
VITE_PUBLIC_URL: https://trip-tick.biscuits.club

- name: Deploy trip-tick to S3
uses: jakejarvis/s3-sync-action@master
Expand Down
15 changes: 14 additions & 1 deletion cdk/lib/cdk-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export class CdkStack extends cdk.Stack {
bucketProps: {
blockPublicAccess: BlockPublicAccess.BLOCK_ALL,
versioned: false,
removalPolicy: cdk.RemovalPolicy.DESTROY,
bucketName: `${props.appId}.biscuits.club`,
lifecycleRules: [],
},
Expand All @@ -44,8 +43,22 @@ export class CdkStack extends cdk.Stack {
domainNames: [`${props.appId}.biscuits.club`],
priceClass: PriceClass.PRICE_CLASS_100,
comment: `${props.appId} app distribution`,
defaultRootObject: 'index.html',
errorResponses: [
{
httpStatus: 403,
responseHttpStatus: 200,
responsePagePath: '/index.html',
},
{
httpStatus: 404,
responseHttpStatus: 200,
responsePagePath: '/index.html',
},
],
},
logS3AccessLogs: false,
insertHttpSecurityHeaders: false,
},
);

Expand Down

0 comments on commit 5a326c9

Please sign in to comment.