Skip to content

Commit

Permalink
ci: fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
bolinocroustibat committed Jan 21, 2025
1 parent 62c07ed commit f224c75
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/deploy_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ jobs:
name: Deploy to prod from ${{ github.ref_name }}/${{ github.sha }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Checkout repo
uses: actions/checkout@v4
with:
ref: ${{ needs.update-changelog.outputs.commit_hash }} # https://schnerring.net/blog/checking-out-code-committed-within-the-same-github-actions-workflow-run/

- name: Install uv
uses: astral-sh/setup-uv@v3
Expand Down Expand Up @@ -43,18 +47,19 @@ jobs:
run: ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts

- name: Execute server commands for deploy
uses: appleboy/ssh-action@v1.1.0
uses: appleboy/ssh-action@v1.2.0
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script_stop: true
script: |
cd /home/www/vj-api
git pull
git fetch
git reset --hard origin/main
/usr/local/bin/uv/bin/uv sync
/usr/local/bin/uv/bin/uv run /home/www/blockhaus101/manage.py migrate
/usr/local/bin/uv/bin/uv run /home/www/blockhaus101/manage.py collectstatic --no-input
/usr/local/bin/uv/bin/uv run /home/www/vj-api/manage.py migrate
/usr/local/bin/uv/bin/uv run /home/www/vj-api/manage.py collectstatic --no-input
sudo systemctl restart vj-api.service
- name: Create Sentry release
Expand Down

0 comments on commit f224c75

Please sign in to comment.