Skip to content

Commit

Permalink
ci: update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
bolinocroustibat committed Oct 16, 2024
1 parent 28856d5 commit bbeccef
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit bbeccef

Please sign in to comment.