From dac08b8683be10f8dc050a22a90ec3e99eef2f38 Mon Sep 17 00:00:00 2001 From: Yar Bash Date: Thu, 21 Nov 2024 22:34:37 +0300 Subject: [PATCH] test-deploy 37 --- .github/workflows/test-deployment.yml | 11 +++++++++-- vite.config.ts | 13 +++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-deployment.yml b/.github/workflows/test-deployment.yml index 8425397..636cad5 100644 --- a/.github/workflows/test-deployment.yml +++ b/.github/workflows/test-deployment.yml @@ -38,6 +38,14 @@ jobs: name: production-build - name: Display artifact files run: ls main + - name: Prepare folders on production server + uses: appleboy/ssh-action@v1.2.0 + with: + host: ${{ vars.SERVER_NAME }} + username: root + key: ${{ secrets.SERVER_SSH_KEY }} + port: 22 + script_path: ./scripts/copy2site.sh - name: Copy build to production server uses: appleboy/scp-action@v0.1.7 with: @@ -45,6 +53,5 @@ jobs: username: root key: ${{ secrets.SERVER_SSH_KEY }} port: 22 - rm: true source: main/* - target: /var/www/webface_test/ + target: /var/www/ diff --git a/vite.config.ts b/vite.config.ts index 10bba41..9f19296 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -51,6 +51,7 @@ export default defineConfig((args) => { }, }, build: { + /* main: () => { return { root: "./src/sites/main", @@ -62,6 +63,18 @@ export default defineConfig((args) => { plugins: [preact(), svgr(svgrOpts)], } }, + */ + main: () => { + return { + root: "./src/sites/main", + publicDir: "./public", + build: { + outDir: '../../../dist/webface_test', + emptyOutDir: true, + }, + plugins: [preact(), svgr(svgrOpts)], + } + }, camera: () => { return { root: "./src/sites/camera",