chore(shuttle): deploy when Shuttle dependency is updated

This commit is contained in:
Orhun Parmaksız 2023-11-30 00:44:47 +03:00
parent 7c9f443943
commit ed9f6aa586
No known key found for this signature in database
GPG Key ID: F83424824B3E4B90
1 changed files with 8 additions and 2 deletions

View File

@ -11,7 +11,6 @@ on:
- master
workflow_dispatch:
jobs:
build:
name: Build / Deploy
@ -25,6 +24,12 @@ jobs:
toolchain: stable
profile: minimal
override: true
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
manifest:
- 'Cargo.**'
- name: Install cargo-binstall
uses: taiki-e/install-action@cargo-binstall
- name: Install cargo-shuttle
@ -35,7 +40,8 @@ jobs:
- name: Build
run: cargo build --locked --verbose
- name: Deploy
if: ${{ startsWith(github.event.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch' }}
if: ${{ startsWith(github.event.ref, 'refs/tags/v') || \
github.event_name == 'workflow_dispatch' || steps.changes.outputs.manifest == 'true' }}
run: |
cargo shuttle login --api-key ${{ secrets.SHUTTLE_TOKEN }}
cargo shuttle project restart