Skip to content

Commit 293a24b

Browse files
Justin MakailaJustin Makaila
authored andcommitted
Update README with deploy steps
1 parent 09a80e0 commit 293a24b

File tree

2 files changed

+31
-15
lines changed

2 files changed

+31
-15
lines changed

.github/workflows/deploy.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ jobs:
2020

2121
- name: Build
2222
run: yarn build
23-
24-
- uses: shallwefootball/s3-upload-action@master
25-
name: Upload S3
26-
id: S3
27-
with:
28-
aws_key_id: ${{ secrets.AWS_KEY_ID }}
29-
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
30-
aws_bucket: ${{ secrets.AWS_BUCKET }}
31-
source_dir: "./build"
32-
destination_dir: "./"
23+
# Uncomment after configuring AWS credentials
24+
# - uses: shallwefootball/s3-upload-action@master
25+
# name: Upload S3
26+
# id: S3
27+
# with:
28+
# aws_key_id: ${{ secrets.AWS_KEY_ID }}
29+
# aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
30+
# aws_bucket: ${{ secrets.AWS_BUCKET }}
31+
# source_dir: "./build"
32+
# destination_dir: "./"

README.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,28 @@ then start the application locally using the following command:
1212

1313
## Deploying to AWS
1414

15-
In order to deploy to AWS, you have to take the following steps:
15+
To deploy to AWS, there are two options:
16+
17+
- Manual deploy
18+
- Automated deploy (via Github Actions)
19+
20+
Both deployment strategies require configuring your AWS stack with the provided `aws-stack.yaml` file.
21+
22+
Required steps:
23+
1624
1. Deploy the CloudFormation Template from the project (`react-cors-spa-stack.yaml`) using AWS CLI or AWS Console
17-
2. Once your stack is deployed, from the "Output" tab, identify the S3 "Bucket" name
18-
3. Build the (using `yarn build`) app for distribution
19-
4. Upload the content of the `build` folder into the S3 bucket identified at step 2
20-
5. Access the application through the CloudFront distribution created at step 1
25+
2. Once your stack is deployed, from the "Output" tab, identify the "APIEndpoint" URL as well as the S3 "Bucket" name
26+
27+
From here, manual deployment steps:
28+
29+
1. Build the (using `yarn build`) app for distribution
30+
2. Upload the content of the `build` folder into the S3 bucket identified at step 2
31+
3. Access the application through the CloudFront distribution created at step 1
32+
33+
For automated deploy via Github Actions:
34+
35+
1. Add a new secret to your repository named `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` with the credentials of an IAM user with permissions to deploy CloudFormation stacks and upload content to S3.
36+
2. Uncomment the last step in `.github/workflows/deploy.yml`. This will trigger a deployment to AWS every time a new commit is pushed to the `main` branch.
2137

2238
## Available Scripts
2339

0 commit comments

Comments
 (0)