From 5c5cffb04cf10e8ac735b5182be17915d8d5f5e0 Mon Sep 17 00:00:00 2001 From: "Jean M. Lescure" Date: Thu, 12 Nov 2020 01:14:18 -0600 Subject: [PATCH] chore: release v1.1.0 --- Dockerfile | 2 +- README.md | 5 ++++- entrypoint.sh | 4 ---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 05e378e..e17c391 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ LABEL "com.github.actions.description"="Build a React.js web app and sync to an LABEL "com.github.actions.icon"="upload-cloud" LABEL "com.github.actions.color"="green" -LABEL version="1.0.8" +LABEL version="1.1.0" LABEL repository="https://github.com/jeanlescure/react-deploy-to-s3-action" LABEL homepage="https://jeanlescure.io/" LABEL maintainer="Jean Lescure " diff --git a/README.md b/README.md index 0232079..1964cd7 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,10 @@ Sensitive information, especially `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY | `SOURCE_DIR` | The `yarn build` output directory you wish to sync/upload to S3. | `env` | No | `public` | | `DEST_DIR` | The directory inside of the S3 bucket you wish to sync/upload to. For example, `my_project/assets`. Defaults to the root of the bucket. | `env` | No | `/` (root of bucket) | | `CLOUDFRONT_DISTRIBUTION_ID` | If you include a CloudFront Distribution Id using this variable, the action will run `aws cloudfront create-invalidation` for the wildcard path `*`, meaning it will completely flush the cache (Note: AWS considers this a single invalidation even though it affects all files in the distribution) so that the new changes synced to S3 are available immediately. | `secret env` | No | N/A | -| `REACT_SCRIPTS` | If you get the error `/bin/sh: react-scripts: not found`, set this variable to `latest` or one of the [published npm versions](https://www.npmjs.com/package/react-scripts?activeTab=versions). | `env` | No | N/A | + +## TROUBLESHOOTING + +- Errors such as `/bin/sh: react-scripts: not found` or `To import Sass files, you first need to install node-sass.` are usually caused by these or other libraries being within `devDependencies` in the `package.json`. **ALL** dependencies should be under the `dependencies` entry within `package.json`. A react application which gets pushed to S3 will be bundled with all its dependencies, there is no such thing as dependencies that are used for development vs production, all dependencies are needed to build the final package of html, js, css, etc. ## License diff --git a/entrypoint.sh b/entrypoint.sh index 378b290..0dd6778 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -39,10 +39,6 @@ ${AWS_REGION} text EOF -if [ -n "$REACT_SCRIPTS" ]; then - npm install react-scripts@${REACT_SCRIPTS} -g --silent -fi - # - Install dependencies # - Build react bundle # - Sync using our dedicated profile and suppress verbose messages.