diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9a900a8..cdb5126 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v4 - name: Install uv - uses: astral-sh/setup-uv@v2 + uses: astral-sh/setup-uv@v3 with: enable-cache: true cache-dependency-glob: "uv.lock" @@ -42,18 +42,16 @@ jobs: - name: Adding known hosts run: ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts - - name: Copy repository to server with rsync - run: rsync -avz --exclude '.git' --chown=github:www-data --chmod=Dg=rwx,Fg=rwx ./ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/home/www/word-generator-api/ # We set directory (D) and files (F) permission for group www-data to rwx so that the same users can overwrite later - - name: Execute server commands for deploy - uses: appleboy/ssh-action@master + uses: appleboy/ssh-action@v1.1.0 with: host: ${{ secrets.SSH_HOST }} username: ${{ secrets.SSH_USER }} key: ${{ secrets.SSH_PRIVATE_KEY }} script: | cd /home/www/word-generator-api - uv sync + git pull + /usr/local/bin/uv/bin/uv sync sudo systemctl restart word-generator-api.service - name: Create Sentry release