Home

Awesome

Shuttle Deploy Action

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 being saved from previous deployments, therefore, they may be omitted for future deployments.
The choice is yours, whether you prefer to add Shuttle Secrets with a manual deployment, or in a continuous way using the secrets input of this action. Read more about Shuttle Secrets here.

Inputs

NameDescriptionRequiredDefault
deploy-keyThe Shuttle API keytrueN/A
cargo-shuttle-versionVersion of cargo-shuttlefalse"" (latest)
working-directoryThe directory which includes the Cargo.tomlfalse"."
nameOverride the project namefalse""
allow-dirtyAllow uncommitted changes to be deployedfalse"false"
no-testDon't run tests before deploymentfalse"false"
secretsContent of the Secrets.toml file, if anyfalse""

Outputs

NameDescription
<!-- | shuttle-url | The URL of the deployed project | -->

Example usage

Typical Example

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_API_KEY }}

Example with all inputs

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_API_KEY }}
          working-directory: "backend"
          name: "my-project"
          allow-dirty: "true"
          no-test: "true"
          cargo-shuttle-version: "0.28.1"
          secrets: |
            MY_AWESOME_SECRET_1 = '${{ secrets.SECRET_1 }}'
            MY_AWESOME_SECRET_2 = '${{ secrets.SECRET_2 }}'