diff --git a/docs/docs/hub/source-control.md b/docs/docs/hub/source-control.md new file mode 100644 index 000000000..9230c487b --- /dev/null +++ b/docs/docs/hub/source-control.md @@ -0,0 +1,50 @@ +--- +title: Source Control +description: Source Control +keywords: [source, control, github, workflow, action, version, yaml] +sidebar_label: Source Control +--- + +# Source Control + +When managing your custom assistants within an organization, you might want to take advantage of your usual source control workflows. Continue makes this easy with a [GitHub Action](https://github.com/continuedev/continue-publish-action) that automatically syncs your YAML files with hub.continue.dev. We are also planning on adding automations for GitLab, BitBucket, Gitee, and others. If you are interested, please reach out to us on [Discord](https://discord.gg/vapESyrFmJ). + +## Quickstart + +This quickstart uses a template repository, but you can also follow these steps 2-4 from an existing repository. + +### 1. Create a new repository from the template + +As shown in the image below, start by creating a new repository from [the template](https://github.com/continuedev/continue-hub-template). Click "Use Template" and then "Create a new repository". + +![Use the template repository](/img/hub/template-repo.png) + +### 2. Obtain a deploy key + +Deploy keys allow the GitHub Action to authenticate with hub.continue.dev. [Obtain your deploy key here](https://hub.continue.dev/settings/api-keys) and then [create a secret](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository) named `CONTINUE_API_KEY` in your GitHub repository. + +### 3. Configure the GitHub Action + +:::tip +This step assumes you have already created an organization on hub.continue.dev. If not, learn more [here](./governance/creating-an-org.md). +::: + +In the repository you created, navigate to `.github/workflows/main.yaml` and update the lines below to match your organization: + +```yaml +env: + OWNER_SLUG: my-org-slug # <-- TODO +``` + +This is the only configuration necessary, but you can view the full list of options [here](https://github.com/continuedev/continue-publish-action/blob/main/README.md). + +### 4. Commit and push + +Add the [YAML for your assistants and blocks](../reference.md) to the appropriate directories: + +- `assistants/public` for public assistants +- `assistants/private` for private (visible only within your organization) assistants +- `blocks/public` for public blocks +- `blocks/private` for private blocks + +Then, commit and push your changes. Once the GitHub Action has completed running, you should be able to view the assistants within your organization on hub.continue.dev. diff --git a/docs/docs/reference.md b/docs/docs/reference.md index 73e4fc1c0..22bc742ab 100644 --- a/docs/docs/reference.md +++ b/docs/docs/reference.md @@ -49,6 +49,28 @@ models: provider: ollama ``` +### Local Blocks + +It is also possible to define blocks locally in a `.continue` folder. This folder can be located at either the root of your workspace (these will automatically be applied to all assistants when you are in that workspace) or in your home directory at `~/.continue` (these will automatically be applied globally). + +Place your YAML files in the following folders: + +Assistants: + +- `.continue/assistants` - for assistants + +Blocks: + +- `.continue/rules` - for rules +- `.continue/models` - for models +- `.continue/prompts` - for prompts +- `.continue/context` - for context providers +- `.continue/docs` - for docs +- `.continue/data` - for data +- `.continue/mcpServers` - for MCP Servers + +You can find many examples of each of these block types on the [Continue Explore Page](https://hub.continue.dev/explore/models) + ### Inputs Blocks can be passed user inputs, including hub secrets and raw text values. To create a block that has an input, use mustache templating as follows: diff --git a/docs/sidebars.js b/docs/sidebars.js index 20a47be93..1a634d163 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -171,6 +171,7 @@ const sidebars = { "hub/governance/pricing", ], }, + "hub/source-control", { type: "link", label: "Customize", diff --git a/docs/static/img/hub/template-repo.png b/docs/static/img/hub/template-repo.png new file mode 100644 index 000000000..36dbf4aa8 Binary files /dev/null and b/docs/static/img/hub/template-repo.png differ