Skip to content

build(deps): bump serde_json from 1.0.128 to 1.0.132 #20

build(deps): bump serde_json from 1.0.128 to 1.0.132

build(deps): bump serde_json from 1.0.128 to 1.0.132 #20

on: [push]
name: iLEAP Demo API CI & CD
concurrency:
group: ${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
build_and_test:
name: Rust project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache target
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
api/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: CI
env:
PRIV_KEY: ${{ secrets.PRIV_KEY }}
working-directory: demo-api
run: |
cargo build
cargo test
cargo clippy -- -Dwarnings
deploy_preview:
needs: build_and_test
if: github.ref == 'refs/heads/preview'
name: Deploy preview app
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only --config demo-api/fly.staging.toml
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_PREVIEW_TOKEN }}
deploy:
needs: build_and_test
if: github.ref == 'refs/heads/main'
name: Deploy app
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only --config demo-api/fly.production.toml
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}