From e8781faf78d4ab4d9ef4dc04571a3fac4ff493cd Mon Sep 17 00:00:00 2001 From: Eduard Kuksa Date: Sat, 22 Feb 2025 18:32:19 +0700 Subject: [PATCH] add db credentials --- .gitea/workflows/maven.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitea/workflows/maven.yaml b/.gitea/workflows/maven.yaml index b6927d9..ba19725 100644 --- a/.gitea/workflows/maven.yaml +++ b/.gitea/workflows/maven.yaml @@ -65,6 +65,13 @@ jobs: run: ssh ${{ vars.DEPLOY_USER }}@${{ vars.DEPLOY_HOST }} mkdir -p ${{ vars.DEPLOY_PATH }} - name: Deploy to Local Server run: scp -r artifact/* ${{ vars.DEPLOY_USER }}@${{ vars.DEPLOY_HOST }}:${{ vars.DEPLOY_PATH }} + - name: Create .env file on Server + run: | + ssh -T ${{ vars.DEPLOY_USER }}@${{ vars.DEPLOY_HOST }} << EOF + echo "DB_USER=${{ secrets.DB_USER }}" > ${{ vars.DEPLOY_PATH }}/.env + echo "DB_PASSWORD=${{ secrets.DB_PASSWORD }}" >> ${{ vars.DEPLOY_PATH }}/.env + echo "DB_URL=${{ vars.DB_URL }}" >> ${{ vars.DEPLOY_PATH }}/.env + EOF - name: Build and Run Docker Image with Docker Compose run: | ssh -T ${{ vars.DEPLOY_USER }}@${{ vars.DEPLOY_HOST }} << EOF