Skip to content

Commit a0941c6

Browse files
committed
fix: write in home directory
1 parent e54c129 commit a0941c6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/deploy.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
# $GCP_SA, $FIREBASE_PROJECT_ID, $GCP_SA_STAGING, $FIREBASE_PROJECT_ID_STAGING are present in CircleCI
66
# $deploy_location is an environment variable set when the job is triggered by one of the two repositories getting pushed. If not present then the deploy was triggered by a commit on the master or staging branch of this very repository.
77

8-
GOOGLE_APPLICATION_CREDENTIALS=gcp_sa.json
8+
export GOOGLE_APPLICATION_CREDENTIALS="$HOME"/gcp_sa.json
99

1010
if [ "${deploy_location:=$CIRCLE_BRANCH}" = 'master' ]; then
1111
echo 'Deploying master branches of PokeAPI/api-data and PokeAPI/pokeapi.co to https://pokeapi.co'
12-
echo "$GCP_SA" > gcp_sa.json
12+
echo "$GCP_SA" > "$HOME"/gcp_sa.json
1313
PROJECT=${FIREBASE_PROJECT_ID}
1414
elif [ "${deploy_location}" = 'staging' ]; then
1515
echo 'Deploying staging branches of PokeAPI/api-data and PokeAPI/pokeapi.co to the staging location'
16-
echo "$GCP_SA_STAGING" > gcp_sa.json
16+
echo "$GCP_SA_STAGING" > "$HOME"/gcp_sa.json
1717
PROJECT=${FIREBASE_PROJECT_ID_STAGING}
1818
fi
1919

0 commit comments

Comments
 (0)