diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 6514018b..837e18b4 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -80,6 +80,7 @@ jobs: - name: .env 파일 작성 run: | + mkdir -p docker-compose echo "DB_URL=${{ secrets.DB_URL }}" >> docker-compose/.env echo "DB_USERNAME=${{ secrets.DB_USERNAME }}" >> docker-compose/.env echo "DB_PASSWORD=${{ secrets.DB_PASSWORD }}" >> docker-compose/.env @@ -93,6 +94,9 @@ jobs: echo "OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}" >> docker-compose/.env echo "TAG=${{ github.sha }}" >> docker-compose/.env + - name: SSH key permissions + run: chmod 400 ${{ secrets.EC2_SSH_KEY }} + - name: .env 파일 EC2로 복사 run: | scp -i ${{ secrets.EC2_SSH_KEY }} docker-compose/.env ubuntu@${{ secrets.EC2_PUBLIC_IP }}:~/docker-compose/.env