Skip to content

try in rave server

try in rave server #8

Workflow file for this run

# name of the workflow
name: Rust
# run workflow when the condition is met
on:
# run when code is pushed on the `main` branch
push:
branches: [ "main", "heroku_integration" ]
# env variables
env:
CARGO_TERM_COLOR: always
# jobs
jobs:
# job name
build:
# os to run the job on support macOS and windows also
runs-on: ubuntu-latest
# steps for job
steps:
# this will get the code and set the git
- uses: actions/checkout@v3
# move to server
- name: move
# using cargo to build
run: cd services/rave-server
# run the build
- name: Build
# using cargo to build
run: SQLX_OFFLINE=TRUE cargo build --release
# for deployment
- name: make dir
# create a directory
run: mkdir app
# put the app in it
- name: copy
run: mv ./target/release/rave-server ./app/rave-server
# heroku deployment
- uses: akhileshns/heroku-deploy@v3.12.12
with:
# key from repository secrets
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
# name of the Heroku app
heroku_app_name: "rave-server"
# email from which the app is uploaded
heroku_email: "caroline@voting.works"
# app directory
appdir: "./app"
# start command
procfile: "web: ./rave-server"
# buildpack is like environment used to run the app
buildpack: "https://github.com/ph3nx/heroku-binary-buildpack.git"