Skip to main content
Connecting your GitHub account via the GitHub integration is easier and simpler for automatic deployments. However, if your deployment requires building other static assets like React or Vue builds, you’ll need to set up a custom GitHub Action and run the build script first before deploying to Shuttle. Shuttle provides a GitHub Action for automating deployments. This action can run the shuttle deploy command for you, enabling continuous deployments on every push. Here’s an example of a GitHub Actions workflow that uses the Shuttle Deploy Action:
name: Deploy to Shuttle

on:
  push:
    branches:
      - main

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: shuttle-hq/deploy-action@v2
        with:
          shuttle-api-key: ${{ secrets.SHUTTLE_API_KEY }}
          project-id: proj_0123456789
          secrets: |
            MY_AWESOME_SECRET_1 = '${{ secrets.SECRET_1 }}'

Inputs

NameDescriptionRequiredDefault
shuttle-api-keyThe Shuttle API keytrueN/A
project-idProject ID, starts with proj_trueN/A
cargo-shuttle-versionVersion of cargo-shuttlefalse"" (latest)
working-directoryThe cargo workspace rootfalse"."
secretsContent of the secrets.toml file, if anyfalse""
extra-argsExtra args to the deploy commandfalse""

Learn More

Check out the official GitHub Deploy Action for more information.