29 lines
541 B
YAML
29 lines
541 B
YAML
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
|