Skip to content

Commit

Permalink
Change script
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-dharti-r committed May 10, 2024
1 parent b779c5b commit f79e95a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
26 changes: 18 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,21 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Deploy to S3
env:
ACM_CERTIFICATE_ARN: ${{ secrets.ACM_CERTIFICATE_ARN }}
run: |
cd website
aws cloudformation validate-template --template-body file://deploy.yml
aws cloudformation deploy --stack-name bitespace-website --template-file deploy.yml --parameter-overrides AcmCertificateArn=$ACM_CERTIFICATE_ARN --capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM
aws s3 sync ./out s3://${{ secrets.WEBSITE_BUCKET_NAME }}
# - name: Deploy to S3
# env:
# ACM_CERTIFICATE_ARN: ${{ secrets.ACM_CERTIFICATE_ARN }}
# run: |
# cd website
# aws cloudformation validate-template --template-body file://deploy.yml
# aws cloudformation deploy --stack-name bitespace-website --template-file deploy.yml --parameter-overrides AcmCertificateArn=$ACM_CERTIFICATE_ARN --capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM
# aws s3 sync ./out s3://${{ secrets.WEBSITE_BUCKET_NAME }}

- name: Deploy to s3
id: bitespace-website
uses: aws-actions/aws-cloudformation-github-deploy@v1
with:
name: bitespace-website
template: deploy.yml
capabilities: CAPABILITY_IAM, CAPABILITY_NAMED_IAM
parameter-overrides: >-
AcmCertificateArn=$ACM_CERTIFICATE_ARN
2 changes: 1 addition & 1 deletion website/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Description: A template for static hosting using S3 bucket and CloudFront
Parameters:
AcmCertificateArn:
Type: String
Description: Name of the the database.
Description: Acm Certificate Arn.

Outputs:
S3BucketName:
Expand Down

0 comments on commit f79e95a

Please sign in to comment.