https://github.com/johnrom/mochi-deployments
Frontend deployments for DotNet Core.
https://github.com/johnrom/mochi-deployments
Last synced: 11 months ago
JSON representation
Frontend deployments for DotNet Core.
- Host: GitHub
- URL: https://github.com/johnrom/mochi-deployments
- Owner: johnrom
- Created: 2020-05-21T18:32:43.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2022-12-08T11:00:04.000Z (over 3 years ago)
- Last Synced: 2025-07-22T06:05:41.590Z (11 months ago)
- Language: C#
- Homepage:
- Size: 83 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# `Nmbl.Deployments`
| | |
| ------ | ------- |
| Status | `alpha` |
| Currently supports | `OrchardCore@1.0.0-rc2-13450` |
Frontend / Serverless deployments for DotNet Core. Consists of a base Library, an Orchard Core library, a Vercel library, and an Orchard Core Module to connect them. Use to create new [GatsbyJS](https://www.gatsbyjs.org/), [NextJS](https://nextjs.org/) or other static site generator builds which query the CMS each time the CMS content is published.
### Getting Started with OrchardCore and Vercel Front-end Deployments
First, make sure you're using the version of Orchard Core listed above, and add `Nmbl.Deployments.OrchardCore.Vercel` to your project.
```
dotnet add Nmbl.Deployments.OrchardCore.Vercel@0.0.1-*
```
Then, add some Vercel configuration to your appSettings.
> Note: doesn't currently support configuration via Orchard Admin.
```jsonc
{
"VercelOptions": {
"TeamId": "",
"ApiToken": "",
"DeployHook": ""
},
"OrchardDeploymentOptions": {
"DeployOnPublish": false, // set to true to deploy after Publishing ContentItems.
}
}
```
Now you can navigate to `Admin -> Content -> Deployments` and list your latest deployments or click "Deploy Now" to run a new deployment.
## `Nmbl.Deployments.Core`
The core deployments library. Has a few options related to [Polly](https://github.com/App-vNext/Polly) policies.
### `DeploymentOptions`
| Setting | Required? | Default Value | Description |
| ------- | --------- | ------------- | ----------- |
| `HttpPolicyRetryCount` | | 3 | Number of times to retry requests after transient http failures, with exponential back-off. |
| `CircuitBreakerPolicyCount` | | 3 | Number of times to fail before breaking, for `CircuitBreakerPolicyIntervalInSeconds`. |
| `CircuitBreakerPolicyIntervalInSeconds` | | 60 | Seconds to break when Circuit Breaker is "open". |
## `Nmbl.Deployments.OrchardCore`
Base OrchardCore library connecting the Core library to Orchard Cache and Publish process.
### `OrchardDeploymentOptions`
`OrchardDeploymentOptions` configures whether publishing the site will automatically run deployments.
| Setting | Required? | Default Value | Description |
| ------- | --------- | ------------- | ----------- |
| `DeployOnPublish` | | false | Run a deployment when hitting Publish on any ContentItem |
## `Nmbl.Deployments.Vercel`
Base Vercel library connecting the Core library to Vercel API endpoints.
### `VercelOptions`
| Setting | Required? | Default Value | Description |
| ------- | ----------| ------------- | ----------- |
| `BaseAddress` | x | https://api.vercel.com | The base address of the Vercel endpoint. |
| `DeployHook` | x | | Vercel Deploy Hook Key, required for running deployments. |
| `ApiToken` | x | | Vercel Api Token for reading Deployment Info. |
| `TeamId` | | | ID of your Vercel Team, if applicable.
| `ProductionBranch` | | `main` | Production branch of your repository
## `Nmbl.Deployments.OrchardCore.Vercel`
Orchard Core Module connecting `Nmbl.Deployments.Vercel` and `Nmbl.Deployments.OrchardCore`. No configuration of its own.