Skip to content

Commit

Permalink
Add production builds script for Vercel
Browse files Browse the repository at this point in the history
  • Loading branch information
garethfuller committed Apr 27, 2021
1 parent 8193b03 commit c787018
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions vercel-production-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

# Use this script to only deploy production builds
# https://vercel.com/docs/platform/projects#ignored-build-step
# https://vercel.com/support/articles/how-do-i-use-the-ignored-build-step-field-on-vercel#with-a-script

echo "VERCEL_ENV: $VERCEL_ENV"

if [[ "$VERCEL_ENV" == "production" ]] ; then
# Proceed with the build
echo "✅ - Build can proceed"
exit 1;

else
# Don't build
echo "🛑 - Build cancelled"
exit 0;
fi

2 comments on commit c787018

@vercel
Copy link

@vercel vercel bot commented on c787018 Apr 27, 2021

Choose a reason for hiding this comment

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

@vercel
Copy link

@vercel vercel bot commented on c787018 Apr 27, 2021

Choose a reason for hiding this comment

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

Please sign in to comment.