Skip to content

Commit e7eabc9

Browse files
committed
Fix: .env 파일 생성 및 GCP 키 파일 생성 로직 추가
1 parent 7fbda36 commit e7eabc9

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,16 @@ jobs:
8282
--project=${{ secrets.GCP_PROJECT_ID }} \
8383
--tunnel-through-iap \
8484
--command="
85-
if [ ! -d '~/BitCoin_DataPipeline' ]; then
86-
git clone https://github.com/${{ github.repository }}.git ~/BitCoin_DataPipeline
87-
fi
8885
cd ~/BitCoin_DataPipeline && \
8986
git pull origin main && \
9087
91-
# Secret에 저장된 전체 내용을 .env 파일로 저장
88+
# .env 파일 생성
9289
echo \"${{ secrets.ENV_FILE }}\" > .env && \
9390
91+
# GCP 키 파일 생성
92+
rm -rf keys/gcp-key.json && \
93+
echo '${{ secrets.GCP_SA_KEY }}' > keys/gcp-key.json && \
94+
9495
sudo gcloud auth configure-docker ${{ env.AR_HOSTNAME }} --quiet && \
9596
sudo docker compose pull && \
9697
sudo docker compose down && \

0 commit comments

Comments
 (0)