Add CircleCI configuration for deployment
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
deployment:
|
||||||
|
staging:
|
||||||
|
branch: staging
|
||||||
|
commands:
|
||||||
|
- ./scripts/deploy --staging
|
||||||
|
production:
|
||||||
|
branch: production
|
||||||
|
commands:
|
||||||
|
- ./scripts/deploy --production
|
||||||
+4
-4
@@ -7,18 +7,18 @@ SITE="crafting-guide.com"
|
|||||||
TARGET=""
|
TARGET=""
|
||||||
while [[ "$1" != "" ]]; do
|
while [[ "$1" != "" ]]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
"--new") TARGET="new";;
|
"--staging") TARGET="staging";;
|
||||||
"--promote") TARGET="promote";;
|
"--production") TARGET="production";;
|
||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ "$TARGET" == "" ]]; then
|
if [[ "$TARGET" == "" ]]; then
|
||||||
echo "Please choose either --new or --promote for the target."
|
echo "Please choose either --staging or --production for the target."
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$TARGET" == "new" ]]; then
|
if [[ "$TARGET" == "staging" ]]; then
|
||||||
find "$ROOT" -name ".DS_Store" 2>/dev/null | xargs rm &>/dev/null
|
find "$ROOT" -name ".DS_Store" 2>/dev/null | xargs rm &>/dev/null
|
||||||
if grunt test; then
|
if grunt test; then
|
||||||
echo "Preparing to upload to S3..."
|
echo "Preparing to upload to S3..."
|
||||||
|
|||||||
Reference in New Issue
Block a user