Skip to content

Commit

Permalink
Add GitHub Actions workflow for Rust deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
kasugamirai committed Feb 18, 2024
1 parent ce9ce84 commit 78c4244
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Rust

on:
push:
branches: [main]

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build Release
uses: actions-rs/cargo@v1
with:
command: build
args: --release --verbose
- name: Copy to Server
uses: appleboy/scp-action@master
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SERVER_SSH_KEY }}
source: "target/release/"
target: "/root/personal/discord-bot/"

0 comments on commit 78c4244

Please sign in to comment.