From 3c558c6e1730aebd028c5c3229c59e50ef5a4202 Mon Sep 17 00:00:00 2001 From: Landon Reed Date: Fri, 22 Jan 2021 14:16:38 -0500 Subject: [PATCH 1/2] docs: update README with deploy steps --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 92fe74463..b4b331aa0 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,25 @@ Install the dependencies and start a local instance using the following script: yarn start ``` +## Deploying the UI + +1. Change `index.html` to point to `dist/index.js` (instead of `example.js`) and upload to s3 bucket (or other file hosting service). +2. Upload `example.css`. +3. Build the js/css bundle (which will appear in the `dist/` directory) and upload. + +Here's an example set of commands using the AWS CLI: +```bash +# The first two steps only need to be performed the first time. +aws s3 cp index.html s3://my-bucket --acl public-read +aws s3 cp example.css s3://my-bucket --acl public-read +# Anytime the otp-react-redux code changes, you'll need to run the following steps: +yarn build +aws s3 cp --recursive dist/ s3://my-bucket/dist --acl public-read +``` + +You can then view your site at: https://my-bucket.s3.amazonaws.com/index.html + + ## Library Documentation More coming soon... From d25824031f78a0e36d48d1b99e751bc4a8e099c7 Mon Sep 17 00:00:00 2001 From: Landon Reed Date: Fri, 29 Jan 2021 00:19:12 +0900 Subject: [PATCH 2/2] docs(README): update deploy instructions --- README.md | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index b4b331aa0..ea317699d 100644 --- a/README.md +++ b/README.md @@ -20,22 +20,18 @@ yarn start ## Deploying the UI -1. Change `index.html` to point to `dist/index.js` (instead of `example.js`) and upload to s3 bucket (or other file hosting service). -2. Upload `example.css`. -3. Build the js/css bundle (which will appear in the `dist/` directory) and upload. - -Here's an example set of commands using the AWS CLI: -```bash -# The first two steps only need to be performed the first time. -aws s3 cp index.html s3://my-bucket --acl public-read -aws s3 cp example.css s3://my-bucket --acl public-read -# Anytime the otp-react-redux code changes, you'll need to run the following steps: -yarn build -aws s3 cp --recursive dist/ s3://my-bucket/dist --acl public-read -``` - -You can then view your site at: https://my-bucket.s3.amazonaws.com/index.html - +1. Build the js/css bundle by running `yarn build`. The build will appear in the `dist/` directory). +2. Modify the `index.html` to point to `dist/index.js` (instead of `example.js`). +3. Upload the following files to wherever you're deploying the UI: + - `index.html` (modified to point to `dist/index.js`) + - `example.css` + - `dist/` + - `index.js` + - `index.js.map` + - `index.css` + - `index.css.map` + +Note: only contents produced during build in the `dist/` directory are likely to change over time (the `index.html` and `example.css` files contain minimal code), so subsequent deployments will typically only need to replace the `dist/` contents. ## Library Documentation