From 62d653f3501a66ad9b63ec0408203e4ef5eb09a0 Mon Sep 17 00:00:00 2001 From: Nikita Aksenov Date: Sun, 19 Oct 2025 23:28:16 +0300 Subject: [PATCH] deploy workflow --- .github/workflows/deploy.yml | 42 ++++++++++++++++++++++++++++++ src/components/RequestLogPanel.tsx | 2 +- tsconfig.json | 2 +- 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..feabe59 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,42 @@ +name: Deploy Vite site to Nginx + +on: + push: + branches: [ main, deploy-test ] + +env: + NODE_VERSION: '20' + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build Vite project + run: npm run build + + - name: Setup SSH + run: | + mkdir -p ~/.ssh + echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + ssh-keyscan -H ${{ secrets.SERVER_IP }} >> ~/.ssh/known_hosts + + - name: Upload dist/ to server + run: | + rsync -az --delete \ + -e "ssh" \ + dist/ \ + "${{ secrets.USERNAME }}@${{ secrets.SERVER_IP }}:${{ secrets.PROJECT_PATH }}/" diff --git a/src/components/RequestLogPanel.tsx b/src/components/RequestLogPanel.tsx index 4931c94..2bb7487 100644 --- a/src/components/RequestLogPanel.tsx +++ b/src/components/RequestLogPanel.tsx @@ -10,7 +10,7 @@ export default function RequestLogPanel() { return (
-

Request Log

+

Request log

diff --git a/tsconfig.json b/tsconfig.json index 02a3e31..72d49cb 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,7 +16,7 @@ "paths": { "@/*": ["src/*"] }, - "ignoreDeprecations": "6.0" + "ignoreDeprecations": "5.0" }, "include": ["src"] }