mirror of
https://github.com/status-im/safe-react.git
synced 2026-08-31 13:41:06 +00:00
Migrate to GitHub actions (#1924)
* Add Github action for each network environment * Disable travis build * Move deploy scripts to new folder * Adapt deploy scripts to Github actions * Run coveralls only if tests succeed * Upload sentry source map * Add Production flag for tagged builds * Use coveralls Github Action * Add debug steps to all networks for first release test
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
function deploy_pull_request {
|
||||
# Pull request number with "pr" prefix
|
||||
PULL_REQUEST_NUMBER="pr$PR_NUMBER"
|
||||
|
||||
# Only alphanumeric characters. Example safe-react -> safereact
|
||||
REVIEW_FEATURE_FOLDER="$REPO_NAME_ALPHANUMERIC/$PULL_REQUEST_NUMBER"
|
||||
|
||||
# App build path
|
||||
APP_PATH="./build"
|
||||
|
||||
# Deploy pull request
|
||||
aws s3 sync $APP_PATH s3://${REVIEW_BUCKET_NAME}/${REVIEW_FEATURE_FOLDER}/${REACT_APP_NETWORK}/app --delete
|
||||
}
|
||||
|
||||
# Only:
|
||||
# - Pull requests
|
||||
# - Security env variables are available. PR from forks don't have them.
|
||||
if [ -n "$AWS_ACCESS_KEY_ID" ]; then
|
||||
deploy_pull_request
|
||||
fi
|
||||
Reference in New Issue
Block a user