log bucket

This commit is contained in:
neil 2022-11-19 14:26:24 +08:00
parent 54ffcf9b12
commit fee0eb2fd6
2 changed files with 10 additions and 10 deletions

View file

@ -9,8 +9,6 @@ import {
RemovalPolicy,
CfnOutput } from "aws-cdk-lib";
import { Construct } from "constructs";
import fs from "fs";
import path from "path";
/**
* The CloudFormation stack holding all our resources
@ -26,10 +24,6 @@ export default class TeaXYZ extends Stack {
autoDeleteObjects: true,
removalPolicy: RemovalPolicy.DESTROY,
});
console.log("BUCKET ARN:", bucket.bucketArn)
fs.writeFile(path.join(process.cwd(), "bucket.txt"), bucket.bucketName, () => {
console.log('bucket name shared');
})
const edgeLambda = lambda.Version.fromVersionArn(this, "Lambda", "arn:aws:lambda:us-east-1:640264234305:function:www-redirect:10");

View file

@ -92,12 +92,18 @@ jobs:
run: yarn deploy
working-directory: .cdk
- run: cat .cdk/cdk.out.json
- uses: 8BitJonny/gh-get-current-pr@2.1.3
id: PR
- name: get cdk bucket
run: |
aws s3 ls | grep teaxyz-pr-${{ steps.PR.outputs.number }}
# sync images from www.tea.xyz/Images/packages to wherever bucket you are
- run: |
aws s3 sync s3://www.tea.xyz/Images/packages \
s3://TeaXYZ-${STAGE}/Images/packages
# - run: |
# aws s3 sync s3://www.tea.xyz/Images/packages \
# s3://TeaXYZ-${STAGE}/Images/packages
- name: Seal Deployment
uses: bobheadxi/deployments@v1