Squadbase

Deploy to Squadbase Button

Learn how to use the Deploy to Squadbase button to streamline project deployment.

The Deploy to Squadbase button allows developers to quickly deploy projects through a streamlined creation flow, automatically cloning repositories and deploying applications with just one click.

Snippets

You can add various URL query parameters to the Deploy to Squadbase button to control and customize the deployment experience for users, depending on your project's requirements.

Deploy to Squadbase

An example Deploy Button using the following HTML snippet.

Use the snippets below in your Git repositories or your dashboards for users to deploy.

[![Deploy to Squadbase](https://app.squadbase.dev/button.svg)](https://app.squadbase.dev/new/clone?repository-url=https://github.com/username/repo-name)
<a href="https://app.squadbase.dev/new/clone?repository-url=https://github.com/username/repo-name">
  <img src="https://app.squadbase.dev/button.svg" alt="Deploy to Squadbase" />
</a>
https://app.squadbase.dev/new/clone?repository-url=https://github.com/username/repo-name

Replace https://github.com/username/repo-name with your actual GitHub repository URL.

How It Works

When users click the "Deploy to Squadbase" button:

  1. Repository Import: The source code is imported from the specified repository
  2. Configuration Detection: Squadbase automatically detects your project settings or uses your squadbase.yml configuration
  3. Environment Setup: Users are prompted to provide any required environment variables
  4. Build & Deploy: The application is built and deployed to your Squadbase environment

For advanced deployment configuration, see the squadbase.yml documentation.

Deploy to Squadbase

Generate Your Own Deploy Button

To create a customized deploy button URL, use the base URL with query parameters:

https://app.squadbase.dev/new/clone?[parameters]

Required Parameters

ParameterDescriptionExample
repository-urlGitHub repository URL to deployhttps://github.com/username/repo-name

Optional Parameters

ParameterDescriptionExample
project-nameCustom project name in Squadbasemy-awesome-app
repository-nameCustom repository name after cloningcustom-repo-name
subdomainPreferred subdomain for deploymentmy-app
env-var-keysComma-separated environment variable keysAPI_KEY,DATABASE_URL
root-pathRoot directory for monorepos./apps/web
config-pathCustom path to squadbase.yml./config/squadbase.yml

Example with Multiple Parameters

https://app.squadbase.dev/new/clone?repository-url=https://github.com/username/repo&project-name=my-app&env-var-keys=API_KEY,DATABASE_URL&subdomain=custom-domain

Environment Variables

When you specify environment variables using the env-var-keys parameter, users will be prompted to enter values during the deployment process.

Example Usage

[![Deploy to Squadbase](https://app.squadbase.dev/button.svg)](https://app.squadbase.dev/new/clone?repository-url=https://github.com/username/repo)
[![Deploy to Squadbase](https://app.squadbase.dev/button.svg)](https://app.squadbase.dev/new/clone?repository-url=https://github.com/username/repo&env-var-keys=DATABASE_URL,API_KEY,SECRET_KEY)

Documenting Required Variables

Include clear documentation about required environment variables in your project:

## Environment Variables

This project requires the following environment variables:

- `DATABASE_URL` - PostgreSQL database connection string
- `API_KEY` - Your API service key
- `SECRET_KEY` - Application secret for session management

Best Practices

README Integration

Include deployment instructions in your project's README:

## Quick Deploy

Deploy this application to Squadbase with one click:

[![Deploy to Squadbase](https://app.squadbase.dev/button.svg)](https://app.squadbase.dev/new/clone?repository-url=https://github.com/yourusername/yourrepo)

### Prerequisites
- Node.js 18+ required
- See `.env.example` for required environment variables

Configuration Setup

Ensure your project is deploy-ready:

  1. Include a squadbase.yml for custom build settings
  2. Provide .env.example showing required environment variables
  3. Document dependencies and system requirements
  4. Test locally before adding the deploy button

Monorepo Support

For monorepos, specify the application directory:

https://app.squadbase.dev/new/clone?repository-url=https://github.com/username/monorepo&root-path=./apps/frontend

Ensure your repository is public or accessible to Squadbase for successful deployment.