Skip to content

Deployment

Deployment #718

Workflow file for this run

name: Deployment
on:
workflow_run:
workflows: [ "Rust CI" ]
branches: [ main ]
types:
- completed
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_and_deploy:
runs-on: self-hosted
environment: intelli
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Update Dependencies
run: cargo update
- name: Build the Project
run: cargo build --release
- name: Deploy to Server
run: |
# Stop the running service
sudo systemctl stop intelli-api
# Copy the new binary to the deployment directory
mv target/release/api /home/fedora/deployments/intelli-api/intelli-api
# Start the service
sudo systemctl start intelli-api