Skip to content

Updated: updated workflow file #1

Updated: updated workflow file

Updated: updated workflow file #1

Workflow file for this run

name: Rust CI/CD Pipeline
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Install Dependencies
run: cargo fetch
- name: Run Tests
run: cargo test
- name: Build Project
run: cargo build --release
deploy:
runs-on: self-hosted
needs: build
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Install Dependencies
run: cargo fetch
- name: Build Project
run: cargo build --release
- name: Deploy to Production
run: |