Skip to content

Commit 95ed191

Browse files
ci: organize CI in jobs and update ci deps
1 parent 9e9f9f8 commit 95ed191

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

.github/workflows/deploy.yml

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ on:
66
- '*'
77

88
jobs:
9-
deploy-prod:
10-
name: Deploy to prod from ${{ github.ref_name }}/${{ github.sha }}
9+
bump-version:
10+
name: Bump version to ${{ github.ref_name }}
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v4
13+
- name: Checkout repo
14+
uses: actions/checkout@v4
1415

1516
- name: Install uv
16-
uses: astral-sh/setup-uv@v3
17+
uses: astral-sh/setup-uv@v6
1718
with:
1819
enable-cache: true
1920
cache-dependency-glob: "uv.lock"
@@ -32,18 +33,14 @@ jobs:
3233
commit_user_email: [email protected]
3334
commit_author: Adrien Carpentier <[email protected]>
3435

35-
- name: Install SSH key
36-
uses: shimataro/ssh-key-action@v2
37-
with:
38-
key: ${{ secrets.SSH_PRIVATE_KEY }}
39-
name: id_rsa
40-
known_hosts: ${{ secrets.SSH_HOST }}
41-
42-
- name: Adding known hosts
43-
run: ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
44-
36+
deploy-prod:
37+
name: Deploy ${{ github.ref_name }} to prod
38+
needs: bump-version
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v4
4542
- name: Execute server commands for deploy
46-
uses: appleboy/ssh-action@v1.1.0
43+
uses: appleboy/ssh-action@v1
4744
with:
4845
host: ${{ secrets.SSH_HOST }}
4946
username: ${{ secrets.SSH_USER }}
@@ -59,11 +56,11 @@ jobs:
5956
sudo systemctl restart word-generator-api.service
6057
6158
- name: Create Sentry release
62-
uses: getsentry/action-release@v1.7.0
59+
uses: getsentry/action-release@v3
6360
env:
6461
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
6562
SENTRY_ORG: "adrien-carpentier"
6663
SENTRY_PROJECT: "word-generator-api"
6764
with:
6865
environment: production
69-
version: ${{ github.ref_name }}
66+
release: ${{ github.ref_name }}

0 commit comments

Comments
 (0)