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.
An example Deploy Button using the following HTML snippet.
Use the snippets below in your Git repositories or your dashboards for users to deploy.
[](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:
- Repository Import: The source code is imported from the specified repository
- Configuration Detection: Squadbase automatically detects your project settings or uses your
squadbase.yml
configuration - Environment Setup: Users are prompted to provide any required environment variables
- Build & Deploy: The application is built and deployed to your Squadbase environment
For advanced deployment configuration, see the squadbase.yml documentation.
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
Parameter | Description | Example |
---|---|---|
repository-url | GitHub repository URL to deploy | https://github.com/username/repo-name |
Optional Parameters
Parameter | Description | Example |
---|---|---|
project-name | Custom project name in Squadbase | my-awesome-app |
repository-name | Custom repository name after cloning | custom-repo-name |
subdomain | Preferred subdomain for deployment | my-app |
env-var-keys | Comma-separated environment variable keys | API_KEY,DATABASE_URL |
root-path | Root directory for monorepos | ./apps/web |
config-path | Custom 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
[](https://app.squadbase.dev/new/clone?repository-url=https://github.com/username/repo)
[](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:
[](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:
- Include a
squadbase.yml
for custom build settings - Provide
.env.example
showing required environment variables - Document dependencies and system requirements
- 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.