Skip to content

Commit

Permalink
Make SOURCE_DIR optional -- sync entire repo if not provided
Browse files Browse the repository at this point in the history
  • Loading branch information
jakejarvis committed Sep 16, 2019
1 parent 65e4444 commit 84f1262
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ jobs:
| Key | Value | Type | Required |
| ------------- | ------------- | ------------- | ------------- |
| `SOURCE_DIR` | The local directory you wish to sync/upload to S3. For example, `./public`. | `env` | **Yes** |
| `AWS_REGION` | The region where you created your bucket in. For example, `us-east-1`. [Full list of regions here.](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-available-regions) | `env` | **Yes** |
| `SOURCE_DIR` | The local directory you wish to sync/upload to S3. For example, `./public`. Defaults to the root of your repository if not provided. | `env` | No |


### Required Secret Variables
Expand Down
3 changes: 1 addition & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ if [ -z "$AWS_REGION" ]; then
fi

if [ -z "$SOURCE_DIR" ]; then
echo "SOURCE_DIR is not set. Quitting."
exit 1
SOURCE_DIR="."
fi

mkdir -p ~/.aws
Expand Down

1 comment on commit 84f1262

@jakejarvis
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes #4

Please sign in to comment.