Add build and deploy workflow
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
name: Build and Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
build-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: rust:latest
|
||||
volumes:
|
||||
- /opt/srvmon:/deploy
|
||||
steps:
|
||||
- name: Install Node
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y nodejs git
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build
|
||||
run: cargo build --release
|
||||
|
||||
- name: Deploy
|
||||
run: |
|
||||
cp target/release/srvmon /deploy/srvmon.new
|
||||
mv /deploy/srvmon.new /deploy/srvmon
|
||||
Reference in New Issue
Block a user