Skip to content

Commit fe343d6

Browse files
committed
fix: use b64
1 parent a0941c6 commit fe343d6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
echo "export deploy_location=<< pipeline.parameters.deploy_location >>" >> "$BASH_ENV"
2828
- run:
2929
name: Deploy website and api-data to the correct environment (production/staging)
30-
command: sh scripts/deploy.sh
30+
command: bash scripts/deploy.sh
3131

3232
workflows:
3333
version: 2

scripts/deploy.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
# Executed when the `master` or `staging` branches of PokeAPI/api-data and PokeAPI/pokeapi.co are pushed to
33
# Runs in CircleCI
44
# Deploys both pokeapi.co and api-data to Firebase in the respective project
@@ -9,11 +9,11 @@ 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" > "$HOME"/gcp_sa.json
12+
echo "$GCP_SA_B64" | base64 --decode > "$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" > "$HOME"/gcp_sa.json
16+
echo "$GCP_SA_STAGING_B64" | base64 --decode > "$HOME"/gcp_sa.json
1717
PROJECT=${FIREBASE_PROJECT_ID_STAGING}
1818
fi
1919

0 commit comments

Comments
 (0)