chore(bot): Add nix flake and lock rust version with rust-toolchain … #14
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: MostlyBot Test & Deploy | |
on: | |
push: | |
branches: [ "main" ] | |
paths: [ "twitch/bot/**" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build | |
run: cd twitch/bot && cargo build --verbose | |
- name: Run tests | |
run: cd twitch/bot && cargo test --verbose | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
environment: production | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: superfly/flyctl-actions/setup-flyctl@master | |
- run: cd twitch/bot && flyctl deploy --remote-only | |
env: | |
FLY_API_TOKEN: ${{ secrets.MOSTLYBOT_FLY_API_TOKEN }} | |