mirror of
https://github.com/nicoburns/blessed-rs
synced 2024-11-10 14:24:30 +00:00
59 lines
No EOL
1.8 KiB
YAML
59 lines
No EOL
1.8 KiB
YAML
name: Blessed.rs
|
|
on: [push]
|
|
env:
|
|
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
|
|
jobs:
|
|
build:
|
|
name: Compile binary
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
- name: Install rust toolchain
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
- name: Restore rust compilation cache
|
|
uses: Swatinem/rust-cache@v1
|
|
- name: Compile release build
|
|
run: cargo build --release --all-features
|
|
- name: Upload binary as artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: blessed-rs-release-binary
|
|
path: target/release/blessed-rs
|
|
deploy_heroku:
|
|
name: Deploy to Heroku
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
- name: Download binary artifact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: blessed-rs-release-binary
|
|
path: target/release
|
|
- name: Deploy to Heroku
|
|
uses: akhileshns/heroku-deploy@v3.12.12
|
|
with:
|
|
heroku_api_key: ${{secrets.HEROKU_API_TOKEN}}
|
|
heroku_app_name: "blessed-rs" #Must be unique in Heroku
|
|
heroku_email: "nico@nicoburns.com"
|
|
usedocker: true
|
|
deploy_flyio:
|
|
name: Deploy app
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
- name: Download binary artifact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: blessed-rs-release-binary
|
|
path: target/release
|
|
- name: Setup flyctl
|
|
uses: superfly/flyctl-actions/setup-flyctl@master
|
|
- name: Deploy to Fly.io
|
|
run: flyctl deploy --remote-only |