Add mongoDB database #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to Railway | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
name: Deploy to Railway | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
# Install Rust | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
# Build the Rust project | |
- name: Build Project | |
run: cargo build --release | |
# Deploy to Railway | |
- name: Deploy to Railway | |
env: | |
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }} | |
run: | | |
curl -fsSL https://railway.app/install | sh | |
railway login --token "$RAILWAY_TOKEN" | |
railway up --yes |