wip: ci/cd try file copy
All checks were successful
Deploy Production Server / if_merged (push) Successful in 5m3s
All checks were successful
Deploy Production Server / if_merged (push) Successful in 5m3s
This commit is contained in:
parent
50be32231d
commit
122ac2b94f
@ -24,18 +24,31 @@ jobs:
|
|||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
cache-dependency-path: src/main/webapp/package-lock.json
|
cache-dependency-path: src/main/webapp/package-lock.json
|
||||||
|
|
||||||
- name: Build site
|
- name: Build frontend
|
||||||
run: |
|
run: |
|
||||||
echo "${{ vars.VITE_ENV }}" > src/main/webapp/.env
|
echo "${{ vars.VITE_ENV }}" > src/main/webapp/.env
|
||||||
cd src/main/webapp
|
cd src/main/webapp
|
||||||
npm install
|
npm install
|
||||||
npm run build
|
npm run build
|
||||||
cd ../../..
|
cd ../../..
|
||||||
|
|
||||||
|
- name: Inject frontend in backend
|
||||||
|
run: |
|
||||||
rm -rf src/main/resources/META-INF/resources
|
rm -rf src/main/resources/META-INF/resources
|
||||||
mkdir -p src/main/resources/META-INF/
|
mkdir -p src/main/resources/META-INF/
|
||||||
mv src/main/webapp/dist src/main/resources/META-INF/resources
|
mv src/main/webapp/dist src/main/resources/META-INF/resources
|
||||||
|
|
||||||
- name: Build application
|
- name: Build backend
|
||||||
run: |
|
run: |
|
||||||
chmod 740 mvnw
|
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
|
||||||
Loading…
x
Reference in New Issue
Block a user