From 122ac2b94f4fcf69c3fd025fd7c73071a78ea4eb Mon Sep 17 00:00:00 2001 From: Thibaut Valentin Date: Mon, 30 Dec 2024 18:01:06 +0100 Subject: [PATCH] wip: ci/cd try file copy --- .gitea/workflows/deploy_in_prod.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/deploy_in_prod.yml b/.gitea/workflows/deploy_in_prod.yml index a7494fd..85bc50f 100644 --- a/.gitea/workflows/deploy_in_prod.yml +++ b/.gitea/workflows/deploy_in_prod.yml @@ -24,18 +24,31 @@ jobs: cache: 'npm' cache-dependency-path: src/main/webapp/package-lock.json - - name: Build site + - name: Build frontend run: | echo "${{ vars.VITE_ENV }}" > src/main/webapp/.env cd src/main/webapp npm install npm run build cd ../../.. + + - name: Inject frontend in backend + run: | rm -rf src/main/resources/META-INF/resources mkdir -p src/main/resources/META-INF/ mv src/main/webapp/dist src/main/resources/META-INF/resources - - name: Build application + - name: Build backend run: | chmod 740 mvnw - ./mvnw package -Pnative -DskipTests \ No newline at end of file + ./mvnw package -Pnative -DskipTests + + - name: Copy runner to vps via scp + uses: appleboy/scp-action@v0.1.7 # Latest in date when creating the workflow + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.SSH_USER }} + port: ${{ secrets.SSH_PORT }} + key: ${{ secrets.SSH_KEY }} + source: "target/*-runner,src/main/resources/cacerts" + target: ${{ secrets.TARGET_DIR }} # Need to create it first on the VPS \ No newline at end of file