From c852b95c43327ce6292c40f885386e5793f6d511 Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Fri, 27 Jun 2025 20:05:08 +0300 Subject: [PATCH] deploy: add SSH checkout and ensure zapishis-strapi directory exists on VPS --- .github/workflows/deploy.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e543a67..ed8fd1c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -29,6 +29,9 @@ jobs: runs-on: ubuntu-latest steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Setup SSH key run: | mkdir -p ~/.ssh @@ -36,6 +39,10 @@ jobs: chmod 600 ~/.ssh/id_rsa ssh-keyscan -H ${{ secrets.VPS_HOST }} >> ~/.ssh/known_hosts + - name: Ensure zapishis-strapi directory exists on VPS + run: | + ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no ${{ secrets.VPS_USER }}@${{ secrets.VPS_HOST }} "mkdir -p /home/${{ secrets.VPS_USER }}/zapishis-strapi" + - name: Copy docker-compose.yml to VPS via SCP uses: appleboy/scp-action@master with: