This action automates the deployment of a Rust project to Shuttle. This action deploys the project to Shuttle, which builds it and hosts it.
Note that you need to have created a project on Shuttle before you can deploy to it. This action will NOT create a new project for you. You can see the documentation on how to create a project here.
Shuttle Secrets are not handled by this action (yet). Add secrets using Secrets.toml with a manual deploy command. Read more about secrets here.
Name | Description | Required | Default |
---|---|---|---|
deploy-key | The Shuttle API key | true | N/A |
cargo-shuttle-version | Version of cargo-shuttle | false | "" (latest) |
working-directory | The directory which includes the Cargo.toml |
false | "." |
name | The directory which includes the Cargo.toml |
false | "." |
allow-dirty | Allow uncommitted changes to be deployed | false | "false" |
no-test | Don't run tests before deployment | false | "false" |
secrets | Content of the Secrets.toml file, if any |
false | "" |
idle-minutes | Duration in minutes that an idle project is kept alive before being put to sleep (0 to never sleep) | false | "30" |
Name | Description |
---|
name: Shuttle Deploy
on:
push:
branches:
- "main"
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: shuttle-hq/deploy-action@main
with:
deploy-key: ${{ secrets.SHUTTLE_DEPLOY_KEY }}
name: Shuttle Deploy
on:
push:
branches:
- "main"
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: shuttle-hq/deploy-action@main
with:
deploy-key: ${{ secrets.SHUTTLE_DEPLOY_KEY }}
working-directory: "backend"
name: "my-project"
allow-dirty: "true"
no-test: "true"
cargo-shuttle-version: "0.21.0"
secrets: |
MY_AWESOME_SECRET_1 = '${{ secrets.SECRET_1 }}'
MY_AWESOME_SECRET_2 = '${{ secrets.SECRET_2 }}'