> For the complete documentation index, see [llms.txt](https://docs.imerit.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.imerit.net/plugins/plugin-developer-documentation/wip-deploying-your-plugin.md).

# \[WIP] Deploying your Plugin

{% hint style="info" %}
This page is not yet complete, and it only contains a general outline of the deployment process. Thank you for your patience as the page is expanded with more details.
{% endhint %}

This page details the recommended way to deploy your Ango Hub Plugin to the cloud.

## Deployment Example

For an example deployment, see [this GitHub repository](https://github.com/imerit-io/plugin-rest-example). It contains everything you need to know to get started:

{% @github-files/github-code-block %}

## Plugin Prerequisites

Your plugin's *Connector* field must be set to REST.

<figure><img src="/files/ayLg3ddw597WG94EWmMV" alt="" width="563"><figcaption></figcaption></figure>

## Deploying to Google Cloud Run

### Google Cloud Platform Prerequisites

* Enable the Cloud Run API and the Artifact Registry API on GCP.
* Configure Workload Identity Federation for GitHub.
* Grant the following IAM permissions:
  * Cloud Run Admin
  * IAM Service Account User
  * Artifact Registry Admin
* Ensure you have this env variable set this way:

`CONNECTOR=REST`

### Steps

#### 1. Configure GitHub Actions

Once you have created your repository containing the plugin files, this file (`.github/workflows/cloudrun-docket.yml`) automates the deployment to Google Cloud Run. Replace `PROJECT_ID`, `REPOSITORY`, and `REGION` with your GCP project details.

#### 2. Triggering Deployment

Whenever you push changes to the `main` branch, deployment is triggered.

## Deploying to AWS App Runner

### AWS Prerequisites

* Ensure IAM roles are configured for GitHub Actions
* Create an Amazon ECR repository named `ango-plugins`
* The sample file [cloudrun-docker.yml](https://github.com/imerit-io/plugin-rest-example/blob/main/.github%2Fworkflows%2Fcloudrun-docker.yml) is a reference on how to set up your variables – please consult it and create your cloudrun-docket.yml file accordingly.
* Set the necessary AWS permissions. This can be done by following the actions specified in these two pages:
  * <https://aws.amazon.com/blogs/security/use-iam-roles-to-connect-github-actions-to-actions-in-aws/>
  * <https://aws.amazon.com/blogs/containers/deploy-applications-in-aws-app-runner-with-github-actions/>

### Steps

* The `.github/workflows/deploy-aws-apprunner.yml` file in the [sample repo](https://github.com/imerit-io/plugin-rest-example) automates the deployment to AWS App Runner. Ensure you replace `AWS_REGION`, `ECR_REPOSITORY`, and `SERVICE` with your own AWS details.
* As with GCP, deployment to AWS App Runner is triggered by pushing changes to the `main` branch or manually via GitHub Actions.
