Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@
{
"group": "Integrations",
"pages": [
"integrations/github",
{
"group": "Databases",
"icon": "database",
Expand Down Expand Up @@ -253,15 +254,11 @@
"groups": [
{
"group": "Templates and Tutorials",
"pages": [
"templates/overview"
]
"pages": ["templates/overview"]
},
{
"group": "Fullstack Templates",
"pages": [
"templates/fullstack/saas-template"
]
"pages": ["templates/fullstack/saas-template"]
},
{
"group": "Tutorials",
Expand Down
23 changes: 16 additions & 7 deletions getting-started/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,17 @@ You can opt out by setting any of these environment variables to `1` or `true`:
- `CI`

The scripts for both platforms are open source [[1]](https://github.com/shuttle-hq/shuttle/blob/main/install.sh) [[2]](https://github.com/shuttle-hq/shuttle/blob/main/install.ps1). Improvements are always welcome!

</Accordion>
</Info>

<Tip>
You can install the [Shuttle MCP](/integrations/mcp-server) to enable AI
coding assistants like Claude and Cursor to access Shuttle documentation,
deploy projects, and fetch logs directly from your editor. Making your coding
experience even faster and more efficient.
</Tip>

## Alternative Installation Methods

### cargo-binstall
Expand All @@ -63,7 +71,10 @@ For those who prefer building from source:
cargo install cargo-shuttle
```

<Note>Building from source requires a Rust toolchain and may take longer than other installation methods.</Note>
<Note>
Building from source requires a Rust toolchain and may take longer than other
installation methods.
</Note>

### Pre-built Binaries

Expand All @@ -80,20 +91,23 @@ Shuttle CLI is also available on other package managers through community-mainta
```sh
brew install cargo-shuttle
```

</Accordion>
<Accordion title="Arch Linux (pacman)">
Available in the [community repository](https://archlinux.org/packages/extra/x86_64/cargo-shuttle/).

```sh
pacman -S cargo-shuttle
```

</Accordion>
<Accordion title="Alpine Linux (apk)">
Available on [Alpine Edge](https://pkgs.alpinelinux.org/packages?name=cargo-shuttle&branch=edge) after enabling the [testing repository](https://wiki.alpinelinux.org/wiki/Repositories).

```sh
apk add cargo-shuttle
```

</Accordion>
</AccordionGroup>

Expand All @@ -120,12 +134,7 @@ You should see the current version number displayed.
>
Get started with your first Shuttle project
</Card>
<Card
title="Examples"
icon="book"
href="/examples"
color="#f8b5F2"
>
<Card title="Examples" icon="book" href="/examples" color="#f8b5F2">
Explore our example projects
</Card>
</CardGroup>
Binary file removed images/shuttle-deploy-action.png
Binary file not shown.
43 changes: 37 additions & 6 deletions integrations/ci-cd.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,43 @@ description: "Streamline your Rust projects with Shuttle CI/CD"
icon: "code-branch"
---

Shuttle provides a GitHub Action for automating deployments.
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.

<Frame type="glass">
<img src="/images/shuttle-deploy-action.png" />
</Frame>
Shuttle provides a GitHub Action for automating deployments. This action can run the `shuttle deploy` command for you, enabling continuous deployments on every push.

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:

[How to use and options here](https://github.com/shuttle-hq/deploy-action#readme).
```yaml
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.
87 changes: 87 additions & 0 deletions integrations/github.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
title: GitHub Integration
description: Connect a GitHub repository for automatic deployments
icon: github
---

Connect your GitHub account to Shuttle to manage and deploy repositories directly from the Shuttle console. You can turn on automatic deployments when you push code to GitHub. When enabled, this integration streamlines your deployment workflow by automatically rebuilding and redeploying your application whenever changes are pushed.

## How It Works

When you connect a GitHub repository to your Shuttle project, we establish a direct link between your codebase and your deployment pipeline.

### Features

- **Deploy Your Own Repository**: Connect your existing GitHub repository to Shuttle, configure your secrets, and deploy your application from Shuttle dashboard
- **Automatic Deployments on Git Push**: Enable automatic deployments so that pushing code to your selected branch triggers an immediate rebuild and redeployment
- **Deploy Templates**: Choose from our pre-configured GitHub templates and deploy them instantly to get started quickly - no CLI installation required
- **Deploy From Dashboard**: Deploy any branch from your repository directly using the "Deploy" button in the console dashboard

<Warning>
### Use-cases and limitations

If your project relies on gitignored assets that are needed when running `shuttle deploy`, you can instead use our [GitHub Deploy Action](/integrations/ci-cd), and build/configure these assets prior to deployment.

Shuttle's automatic deployments from GitHub are designed for projects where the codebase is fully ready to deploy with `shuttle deploy` after checkout.

</Warning>

## Which Should I Use?

| Your Project | Use This |
| :--------------------------------------------- | :--------------------- |
| Pure Rust backend (Axum, Actix, Rocket) | **GitHub Integration** |
| Rust + pre-built static files committed to git | **GitHub Integration** |
| Rust + React/Vue build step | **GitHub Actions** |
| Rust + Asset compilation (SCSS, Tailwind) | **GitHub Actions** |
| Rust + Code generation before deploy | **GitHub Actions** |

## Connecting Your GitHub Account

To integrate GitHub with your Shuttle project, follow these steps:

1. Navigate to the [Integrations page](https://console.shuttle.dev/account/integrations) in Shuttle Console.
2. Click "Connect to GitHub" to authorise Shuttle to access your selected repositories.
3. GitHub will prompt you to provide access.

## Deploying a GitHub Repository

1. Navigate to [new project](https://console.shuttle.dev/new-project) and select "**GitHub Repository".**
2. Once authorised, select the repository you want to deploy.
3. Confirm the repository is configured to run on Shuttle. See the [migration docs](/migration/guide) for guidance.
4. Select the branch and add secrets if required.
5. Confirm deployment and your project will be deployed to Shuttle 🚀

## Connecting a GitHub Repository to an Existing Project

1. Navigate to **project** **settings** of your desired project.
2. Once authorised, select the repository you want to connect to this Shuttle project.
3. After selecting your repository, confirm the connection. Your Shuttle project is now linked to your GitHub repository.

_Disconnecting removes the link between Shuttle and your repository but doesn't affect your deployed application or your GitHub repository itself._

## Automatic Deployments

Once you've connected a GitHub repository to your Shuttle project, you can push to GitHub and Shuttle will automatically pull the latest code from your connected repository, build it, and deploy the updated application.

1. Navigate to project settings and ensure a GitHub repository is connected.
2. Enable **Automatic Deployments**
3. Select and confirm branch.
4. Push to GitHub and a deployment will automatically begin.

## Deploying a GitHub Template

Deploying a template sets up both the Shuttle project and a new GitHub repository in your connected GitHub account. You get a fully functional application deployed on Shuttle with the complete source code in your GitHub account.

1. Navigate to [Shuttle Console](https://console.shuttle.dev/new-project) and select "**Template".**
2. Select desired template.
3. Choose "**Deploy from GitHub**" development flow and authorise if required.
4. Select which GitHub account you would like the template to be generated to and name repository.
5. If required, add secrets and **deploy**.

## Permissions for Growth Tier

**Team members on a Growth plan** have **view access** to GitHub integration settings but cannot modify them.

- Team members are unable to connect a repository, disconnect or change a linked repository.
- **Both** account **owners** and **team** members can **enable** **automatic** **deployments** and **deploy** a **connected** **repository**.
4 changes: 2 additions & 2 deletions integrations/mcp-server.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: MCP server
title: Shuttle MCP
description: How to set up the Shuttle MCP server for use in AI coding assistants
icon: sparkles
---
Expand Down Expand Up @@ -91,7 +91,7 @@ claude mcp add Shuttle --scope user -- shuttle mcp start
### Configuration File Locations

| IDE | Configuration Path |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| :------------- | :------------------------------------------------------------------------------------------------------------------------------------------ |
| Cursor | `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (project) |
| Windsurf | `~/.codeium/windsurf/mcp_config.json` |
| VSCode | User settings or `.vscode/mcp.json` (project) |
Expand Down