mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-04-18 00:08:54 +00:00
No more deploy!
This commit is contained in:
parent
03b83f84e9
commit
b254f5085a
1 changed files with 0 additions and 62 deletions
62
.github/workflows/deploy.yml
vendored
62
.github/workflows/deploy.yml
vendored
|
@ -1,62 +0,0 @@
|
||||||
name: Deploy
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Build a Release Binary
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: actions-rs/toolchain@v1
|
|
||||||
id: cargo
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
components: clippy
|
|
||||||
- uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ runner.os }}-rust-${{ steps.cargo.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }}-release-build
|
|
||||||
- name: Build release
|
|
||||||
run: cargo build --release
|
|
||||||
env:
|
|
||||||
SQLX_OFFLINE: "true"
|
|
||||||
- name: Upload compiled binary artifact
|
|
||||||
uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: youmubot-release
|
|
||||||
path: target/release/youmubot
|
|
||||||
deploy:
|
|
||||||
name: Deploy to remote
|
|
||||||
needs: build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Collect artifact
|
|
||||||
uses: actions/download-artifact@v1
|
|
||||||
with:
|
|
||||||
name: youmubot-release
|
|
||||||
- name: Upload binary
|
|
||||||
uses: appleboy/scp-action@master
|
|
||||||
with:
|
|
||||||
host: ${{ secrets.HOST }}
|
|
||||||
username: ${{ secrets.USERNAME }}
|
|
||||||
key: ${{ secrets.SSH_KEY }}
|
|
||||||
port: ${{ secrets.PORT }}
|
|
||||||
source: youmubot-release/youmubot
|
|
||||||
target: youmubot
|
|
||||||
strip_components: 1
|
|
||||||
- name: Restart youmubot
|
|
||||||
uses: appleboy/ssh-action@master
|
|
||||||
with:
|
|
||||||
host: ${{ secrets.HOST }}
|
|
||||||
username: ${{ secrets.USERNAME }}
|
|
||||||
key: ${{ secrets.SSH_KEY }}
|
|
||||||
port: ${{ secrets.PORT }}
|
|
||||||
script: |
|
|
||||||
chmod +x youmubot/youmubot
|
|
||||||
systemctl --user restart youmubot
|
|
Loading…
Add table
Reference in a new issue