From 9e9bae1f7642273599a9b5d9cfe5a18f56093f6c Mon Sep 17 00:00:00 2001 From: tlarbals824 Date: Tue, 25 Jul 2023 18:07:40 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20CD=20=ED=99=98=EA=B2=BD=20=EB=B3=80?= =?UTF-8?q?=EC=88=98=20=EC=84=A4=EC=A0=95=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 4d3a767..95b69df 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -26,13 +26,18 @@ jobs: shell: bash - name: Set .env for configuration - run: | - touch ./.env - echo "MONGO_USERNAME=${{ secrets.MONGO_USERNAME }}" >> ./.env - echo "MONGO_PASSWORD=${{ secrets.MONGO_PASSWORD }}" >> ./.env - echo "DOCKER_USERNAME=${{ secrets.DOCKER_USERNAME }}" >> ./.env - echo "DOCKER_REPOSITORY=${{ secrets.DOCKER_REPOSITORY }}" >> ./.env - shell: bash + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.HOST }} + username: ubuntu + key: ${{ secrets.KEY }} + script: | + rm -rf ./.env + touch ./.env + echo "MONGO_USERNAME=${{ secrets.MONGO_USERNAME }}" >> ./.env + echo "MONGO_PASSWORD=${{ secrets.MONGO_PASSWORD }}" >> ./.env + echo "DOCKER_USERNAME=${{ secrets.DOCKER_USERNAME }}" >> ./.env + echo "DOCKER_REPOSITORY=${{ secrets.DOCKER_REPOSITORY }}" >> ./.env - name: Build With Gradle run: ./gradlew build