wip: ci/cd try file copy
All checks were successful
Deploy Production Server / if_merged (push) Successful in 5m3s

This commit is contained in:
Thibaut Valentin 2024-12-30 18:01:06 +01:00
parent 50be32231d
commit 122ac2b94f

View File

@ -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
./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