Skip to content

Commit 80f7d0e

Browse files
committed
removed deploys
1 parent 0029e3d commit 80f7d0e

File tree

2 files changed

+39
-102
lines changed

2 files changed

+39
-102
lines changed

.github/workflows/ci.yaml

Lines changed: 0 additions & 102 deletions
This file was deleted.

.github/workflows/deploy.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Deploy Miguer API
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy:
10+
name: Build and Deploy to VPS
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repo
15+
uses: actions/checkout@v3
16+
17+
- name: Install Rust
18+
uses: dtolnay/rust-toolchain@stable
19+
20+
- name: Build release
21+
run: cargo build --release
22+
23+
- name: Copy binary to VPS
24+
uses: appleboy/scp-action@v0.1.4
25+
with:
26+
host: ${{ secrets.VPS_HOST }}
27+
username: ${{ secrets.VPS_USER }}
28+
key: ${{ secrets.VPS_SSH_KEY }}
29+
source: target/release/miguer_api-cli
30+
target: /home/locoapp/miguer-api/
31+
32+
- name: Restart service via SSH
33+
uses: appleboy/ssh-action@v1.0.0
34+
with:
35+
host: ${{ secrets.VPS_HOST }}
36+
username: ${{ secrets.VPS_USER }}
37+
key: ${{ secrets.VPS_SSH_KEY }}
38+
script: |
39+
sudo systemctl restart miguer-api

0 commit comments

Comments
 (0)