> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shuttle.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub Actions

> Streamline your Rust projects with Shuttle CI/CD

Connecting your GitHub account via the [GitHub integration](/integrations/github) 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:

```yaml theme={null}
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

| Name | Description | Required | Default |
| :- | :- | :- | :- |
| shuttle-api-key | The Shuttle API key | true | N/A |
| project-id | Project ID, starts with `proj_` | true | N/A |
| cargo-shuttle-version | Version of cargo-shuttle | false | `""` (latest) |
| working-directory | The cargo workspace root | false | `"."` |
| secrets | Content of the `secrets.toml` file, if any | false | `""` |
| extra-args | Extra args to the deploy command | false | `""` |

## Learn More

Check out the official [GitHub Deploy Action](https://github.com/shuttle-hq/deploy-action) for more information.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.