-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (33 loc) · 1.01 KB
/
cd.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
on: [push]
name: CD
jobs:
build_and_test:
name: Rust project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
- name: build
uses: actions-rs/cargo@v1
with:
command: build
args: -p rave-app-backend --release
- name: push binary to dev instance
uses: appleboy/[email protected]
with:
host: [email protected]
username: ubuntu
key: "${{ secrets.SSH_PRIVATE_KEY_DEV_INSTANCE }}"
port: 22
source: "./target/release/rave-app-backend"
target: /home/ubuntu/rave-app-backend
- name: restart dev service
uses: appleboy/[email protected]
with:
host: [email protected]
username: ubuntus
key: "${{ secrets.SSH_PRIVATE_KEY_DEV_INSTANCE }}"
port: 22
script: whoami