-
Notifications
You must be signed in to change notification settings - Fork 0
AWS S3 Deployment
To host Angular as a static website on Amazon S3, please follow the below steps:
-
Step 3: Create the below two secrets in your GitHub repository
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
Please reference Official GitHub Secrets Documentation for guidance
-
Step 4: Update the bucket policy with your S3 bucket name The policy document can be located under the
.github/workflowsfolder. Edit thepolicy.jsonfile and replace line#12 with the name of your S3 bucket -
Step 5: Edit the
deploy.ymlfile to update the S3 bucket each time you merge new code into themasterormainbranch Thedeploy.ymlfile can be located under the.github/workflowsfolder. Edit lines 38 - 42 and replacemy-angular-templatewith the name of your S3 bucket -
Step 6: Merge the code into the
masterormainbranch by opening a new PR request. Once the PR request has been merged, the GitHub Actions workflow will launch and deploy the application to your S3 bucket
Your website should now be available at http://{bucket-name}.s3-website-{aws-region}.amazonaws.com/