Skip to content

Commit

Permalink
updated the workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Dipankar Das <[email protected]>
  • Loading branch information
dipankardas011 committed Dec 1, 2024
1 parent 0a43d68 commit da432a8
Show file tree
Hide file tree
Showing 61 changed files with 246 additions and 1,568 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/sync-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Generate and Sync CLI Docs

on:
push:
branches:
- main
paths:
- 'cli/**' # Adjust this to match your CLI code structure
- 'gen/docs.md/**' # If the generator is in a separate directory

workflow_dispatch:

jobs:
generate-and-sync-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout CLI repository
uses: actions/checkout@v4
with:
path: cli-repo

- name: Checkout Docs repository
uses: actions/checkout@v4
with:
path: docs-repo
repository: 'ksctl/docs'
ref: 'main'

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 'stable'

- name: Generate Documentation
working-directory: cli-repo
run: |
make gen-docs
- name: Sync Generated Docs
run: |
# Copy generated docs
cp -rv cli-repo/gen/docs.md/. docs-repo/content/en/docs/develop/Reference/.
- name: Commit and Push Changes
working-directory: docs-repo
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name github-actions
git config user.email [email protected]
git add content/en/cli-reference
git diff --quiet && git diff --staged --quiet || (git commit -m "chore(cicd): Update CLI documentation" && git push)
7 changes: 6 additions & 1 deletion gen/docs.md/ksctl.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: ksctl
description: Command documentation for ksctl
---

## ksctl

CLI tool for managing multiple K8s clusters
Expand Down Expand Up @@ -31,4 +36,4 @@ CLI tool for managing multiple K8s clusters
* [ksctl self-update](ksctl_self-update.md) - update the ksctl cli
* [ksctl version](ksctl_version.md) - Print the version number of ksctl

###### Auto generated by spf13/cobra on 24-Aug-2024
###### Auto generated by spf13/cobra on 1-Dec-2024
7 changes: 6 additions & 1 deletion gen/docs.md/ksctl_connect-cluster.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: ksctl_connect-cluster
description: Command documentation for ksctl_connect-cluster
---

## ksctl connect-cluster

Use to switch between clusters
Expand Down Expand Up @@ -56,4 +61,4 @@ ksctl connect-context -s external-store-mongodb -p civo -n <clustername> -r <reg

* [ksctl](ksctl.md) - CLI tool for managing multiple K8s clusters

###### Auto generated by spf13/cobra on 24-Aug-2024
###### Auto generated by spf13/cobra on 1-Dec-2024
7 changes: 6 additions & 1 deletion gen/docs.md/ksctl_create-cluster.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: ksctl_create-cluster
description: Command documentation for ksctl_create-cluster
---

## ksctl create-cluster

Use to create a cluster
Expand Down Expand Up @@ -38,4 +43,4 @@ ksctl create --help
* [ksctl create-cluster ha-civo](ksctl_create-cluster_ha-civo.md) - Use to create a self-managed Highly Available cluster on Civo
* [ksctl create-cluster local](ksctl_create-cluster_local.md) - Use to create a kind cluster

###### Auto generated by spf13/cobra on 24-Aug-2024
###### Auto generated by spf13/cobra on 1-Dec-2024
7 changes: 6 additions & 1 deletion gen/docs.md/ksctl_create-cluster_aws.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: ksctl_create-cluster_aws
description: Command documentation for ksctl_create-cluster_aws
---

## ksctl create-cluster aws

Use to create a EKS cluster in Aws
Expand Down Expand Up @@ -46,4 +51,4 @@ ksctl create-cluster aws -n demo -r ap-south-1 -s store-local --nodeSizeMP t2.mi

* [ksctl create-cluster](ksctl_create-cluster.md) - Use to create a cluster

###### Auto generated by spf13/cobra on 24-Aug-2024
###### Auto generated by spf13/cobra on 1-Dec-2024
7 changes: 6 additions & 1 deletion gen/docs.md/ksctl_create-cluster_azure.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: ksctl_create-cluster_azure
description: Command documentation for ksctl_create-cluster_azure
---

## ksctl create-cluster azure

Use to create a AKS cluster in Azure
Expand Down Expand Up @@ -46,4 +51,4 @@ ksctl create-cluster azure -n demo -r eastus -s store-local --nodeSizeMP Standar

* [ksctl create-cluster](ksctl_create-cluster.md) - Use to create a cluster

###### Auto generated by spf13/cobra on 24-Aug-2024
###### Auto generated by spf13/cobra on 1-Dec-2024
7 changes: 6 additions & 1 deletion gen/docs.md/ksctl_create-cluster_civo.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: ksctl_create-cluster_civo
description: Command documentation for ksctl_create-cluster_civo
---

## ksctl create-cluster civo

Use to create a Civo managed k3s cluster
Expand Down Expand Up @@ -46,4 +51,4 @@ ksctl create-cluster civo --name demo --region LON1 --storage store-local --node

* [ksctl create-cluster](ksctl_create-cluster.md) - Use to create a cluster

###### Auto generated by spf13/cobra on 24-Aug-2024
###### Auto generated by spf13/cobra on 1-Dec-2024
7 changes: 6 additions & 1 deletion gen/docs.md/ksctl_create-cluster_ha-aws.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: ksctl_create-cluster_ha-aws
description: Command documentation for ksctl_create-cluster_ha-aws
---

## ksctl create-cluster ha-aws

Use to create a self-managed Highly Available cluster on AWS
Expand Down Expand Up @@ -52,4 +57,4 @@ ksctl create-cluster ha-aws -n demo -r us-east-1 --bootstrap k3s -s store-local
* [ksctl create-cluster](ksctl_create-cluster.md) - Use to create a cluster
* [ksctl create-cluster ha-aws add-nodes](ksctl_create-cluster_ha-aws_add-nodes.md) - Use to add more worker nodes in self-managed Highly-Available cluster on Aws

###### Auto generated by spf13/cobra on 24-Aug-2024
###### Auto generated by spf13/cobra on 1-Dec-2024
7 changes: 6 additions & 1 deletion gen/docs.md/ksctl_create-cluster_ha-aws_add-nodes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: ksctl_create-cluster_ha-aws_add-nodes
description: Command documentation for ksctl_create-cluster_ha-aws_add-nodes
---

## ksctl create-cluster ha-aws add-nodes

Use to add more worker nodes in self-managed Highly-Available cluster on Aws
Expand Down Expand Up @@ -35,4 +40,4 @@ ksctl create ha-aws add-nodes -n demo -r ap-south-1 -s store-local --noWP 3 --no

* [ksctl create-cluster ha-aws](ksctl_create-cluster_ha-aws.md) - Use to create a self-managed Highly Available cluster on AWS

###### Auto generated by spf13/cobra on 24-Aug-2024
###### Auto generated by spf13/cobra on 1-Dec-2024
7 changes: 6 additions & 1 deletion gen/docs.md/ksctl_create-cluster_ha-azure.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: ksctl_create-cluster_ha-azure
description: Command documentation for ksctl_create-cluster_ha-azure
---

## ksctl create-cluster ha-azure

Use to create a self-managed Highly-Available cluster on Azure
Expand Down Expand Up @@ -53,4 +58,4 @@ ksctl create-cluster ha-azure --name demo --region eastus --bootstrap kubeadm --
* [ksctl create-cluster](ksctl_create-cluster.md) - Use to create a cluster
* [ksctl create-cluster ha-azure add-nodes](ksctl_create-cluster_ha-azure_add-nodes.md) - Use to add more worker nodes in self-managed Highly-Available cluster on Azure

###### Auto generated by spf13/cobra on 24-Aug-2024
###### Auto generated by spf13/cobra on 1-Dec-2024
7 changes: 6 additions & 1 deletion gen/docs.md/ksctl_create-cluster_ha-azure_add-nodes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: ksctl_create-cluster_ha-azure_add-nodes
description: Command documentation for ksctl_create-cluster_ha-azure_add-nodes
---

## ksctl create-cluster ha-azure add-nodes

Use to add more worker nodes in self-managed Highly-Available cluster on Azure
Expand Down Expand Up @@ -36,4 +41,4 @@ ksctl create ha-azure add-nodes -n demo -r eastus -s store-local --noWP 3 --node

* [ksctl create-cluster ha-azure](ksctl_create-cluster_ha-azure.md) - Use to create a self-managed Highly-Available cluster on Azure

###### Auto generated by spf13/cobra on 24-Aug-2024
###### Auto generated by spf13/cobra on 1-Dec-2024
7 changes: 6 additions & 1 deletion gen/docs.md/ksctl_create-cluster_ha-civo.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: ksctl_create-cluster_ha-civo
description: Command documentation for ksctl_create-cluster_ha-civo
---

## ksctl create-cluster ha-civo

Use to create a self-managed Highly Available cluster on Civo
Expand Down Expand Up @@ -53,4 +58,4 @@ ksctl create-cluster ha-civo --name demo --region LON1 --bootstrap kubeadm --sto
* [ksctl create-cluster](ksctl_create-cluster.md) - Use to create a cluster
* [ksctl create-cluster ha-civo add-nodes](ksctl_create-cluster_ha-civo_add-nodes.md) - Use to add more worker nodes in self-managed Highly-Available cluster on Civo

###### Auto generated by spf13/cobra on 24-Aug-2024
###### Auto generated by spf13/cobra on 1-Dec-2024
7 changes: 6 additions & 1 deletion gen/docs.md/ksctl_create-cluster_ha-civo_add-nodes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: ksctl_create-cluster_ha-civo_add-nodes
description: Command documentation for ksctl_create-cluster_ha-civo_add-nodes
---

## ksctl create-cluster ha-civo add-nodes

Use to add more worker nodes in self-managed Highly-Available cluster on Civo
Expand Down Expand Up @@ -36,4 +41,4 @@ ksctl create ha-civo add-nodes -n demo -r LON1 -s store-local --noWP 3 --nodeSiz

* [ksctl create-cluster ha-civo](ksctl_create-cluster_ha-civo.md) - Use to create a self-managed Highly Available cluster on Civo

###### Auto generated by spf13/cobra on 24-Aug-2024
###### Auto generated by spf13/cobra on 1-Dec-2024
7 changes: 6 additions & 1 deletion gen/docs.md/ksctl_create-cluster_local.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: ksctl_create-cluster_local
description: Command documentation for ksctl_create-cluster_local
---

## ksctl create-cluster local

Use to create a kind cluster
Expand Down Expand Up @@ -44,4 +49,4 @@ ksctl create-cluster local --name demo --storage store-local --noMP 3

* [ksctl create-cluster](ksctl_create-cluster.md) - Use to create a cluster

###### Auto generated by spf13/cobra on 24-Aug-2024
###### Auto generated by spf13/cobra on 1-Dec-2024
7 changes: 6 additions & 1 deletion gen/docs.md/ksctl_cred.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: ksctl_cred
description: Command documentation for ksctl_cred
---

## ksctl cred

Login to your Cloud-provider Credentials
Expand Down Expand Up @@ -29,4 +34,4 @@ ksctl cred [flags]

* [ksctl](ksctl.md) - CLI tool for managing multiple K8s clusters

###### Auto generated by spf13/cobra on 24-Aug-2024
###### Auto generated by spf13/cobra on 1-Dec-2024
7 changes: 6 additions & 1 deletion gen/docs.md/ksctl_delete-cluster.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: ksctl_delete-cluster
description: Command documentation for ksctl_delete-cluster
---

## ksctl delete-cluster

Use to delete a cluster
Expand Down Expand Up @@ -38,4 +43,4 @@ ksctl delete --help
* [ksctl delete-cluster ha-civo](ksctl_delete-cluster_ha-civo.md) - Use to delete a self-managed Highly Available cluster on Civo
* [ksctl delete-cluster local](ksctl_delete-cluster_local.md) - Use to delete a kind cluster

###### Auto generated by spf13/cobra on 24-Aug-2024
###### Auto generated by spf13/cobra on 1-Dec-2024
7 changes: 6 additions & 1 deletion gen/docs.md/ksctl_delete-cluster_aws.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: ksctl_delete-cluster_aws
description: Command documentation for ksctl_delete-cluster_aws
---

## ksctl delete-cluster aws

Use to deletes a EKS cluster
Expand Down Expand Up @@ -40,4 +45,4 @@ ksctl delete aws --name demo --region ap-south-1 --storage store-local

* [ksctl delete-cluster](ksctl_delete-cluster.md) - Use to delete a cluster

###### Auto generated by spf13/cobra on 24-Aug-2024
###### Auto generated by spf13/cobra on 1-Dec-2024
7 changes: 6 additions & 1 deletion gen/docs.md/ksctl_delete-cluster_azure.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: ksctl_delete-cluster_azure
description: Command documentation for ksctl_delete-cluster_azure
---

## ksctl delete-cluster azure

Use to deletes a AKS cluster
Expand Down Expand Up @@ -41,4 +46,4 @@ ksctl delete azure --name demo --region eastus --storage store-local

* [ksctl delete-cluster](ksctl_delete-cluster.md) - Use to delete a cluster

###### Auto generated by spf13/cobra on 24-Aug-2024
###### Auto generated by spf13/cobra on 1-Dec-2024
7 changes: 6 additions & 1 deletion gen/docs.md/ksctl_delete-cluster_civo.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: ksctl_delete-cluster_civo
description: Command documentation for ksctl_delete-cluster_civo
---

## ksctl delete-cluster civo

Use to delete a Civo managed k3s cluster
Expand Down Expand Up @@ -41,4 +46,4 @@ ksctl delete civo --name demo --region LON1 --storage store-local

* [ksctl delete-cluster](ksctl_delete-cluster.md) - Use to delete a cluster

###### Auto generated by spf13/cobra on 24-Aug-2024
###### Auto generated by spf13/cobra on 1-Dec-2024
7 changes: 6 additions & 1 deletion gen/docs.md/ksctl_delete-cluster_ha-aws.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: ksctl_delete-cluster_ha-aws
description: Command documentation for ksctl_delete-cluster_ha-aws
---

## ksctl delete-cluster ha-aws

Use to delete a self-managed Highly Available cluster on AWS
Expand Down Expand Up @@ -42,4 +47,4 @@ ksctl delete ha-aws --name demo --region us-east-1 --storage store-local
* [ksctl delete-cluster](ksctl_delete-cluster.md) - Use to delete a cluster
* [ksctl delete-cluster ha-aws del-nodes](ksctl_delete-cluster_ha-aws_del-nodes.md) - Use to remove worker nodes in self-managed Highly-Available cluster on Aws

###### Auto generated by spf13/cobra on 24-Aug-2024
###### Auto generated by spf13/cobra on 1-Dec-2024
7 changes: 6 additions & 1 deletion gen/docs.md/ksctl_delete-cluster_ha-aws_del-nodes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: ksctl_delete-cluster_ha-aws_del-nodes
description: Command documentation for ksctl_delete-cluster_ha-aws_del-nodes
---

## ksctl delete-cluster ha-aws del-nodes

Use to remove worker nodes in self-managed Highly-Available cluster on Aws
Expand Down Expand Up @@ -34,4 +39,4 @@ ksctl delete ha-aws del-nodes -n demo -r us-east-1 -s store-local --noWP 1

* [ksctl delete-cluster ha-aws](ksctl_delete-cluster_ha-aws.md) - Use to delete a self-managed Highly Available cluster on AWS

###### Auto generated by spf13/cobra on 24-Aug-2024
###### Auto generated by spf13/cobra on 1-Dec-2024
7 changes: 6 additions & 1 deletion gen/docs.md/ksctl_delete-cluster_ha-azure.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: ksctl_delete-cluster_ha-azure
description: Command documentation for ksctl_delete-cluster_ha-azure
---

## ksctl delete-cluster ha-azure

Use to delete a self-managed Highly Available cluster on Azure
Expand Down Expand Up @@ -42,4 +47,4 @@ ksctl delete ha-azure --name demo --region eastus --storage store-local
* [ksctl delete-cluster](ksctl_delete-cluster.md) - Use to delete a cluster
* [ksctl delete-cluster ha-azure del-nodes](ksctl_delete-cluster_ha-azure_del-nodes.md) - Use to remove worker nodes in self-managed Highly-Available cluster on Azure

###### Auto generated by spf13/cobra on 24-Aug-2024
###### Auto generated by spf13/cobra on 1-Dec-2024
7 changes: 6 additions & 1 deletion gen/docs.md/ksctl_delete-cluster_ha-azure_del-nodes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: ksctl_delete-cluster_ha-azure_del-nodes
description: Command documentation for ksctl_delete-cluster_ha-azure_del-nodes
---

## ksctl delete-cluster ha-azure del-nodes

Use to remove worker nodes in self-managed Highly-Available cluster on Azure
Expand Down Expand Up @@ -35,4 +40,4 @@ ksctl delete ha-azure del-nodes -n demo -r eastus -s store-local --noWP 1 #

* [ksctl delete-cluster ha-azure](ksctl_delete-cluster_ha-azure.md) - Use to delete a self-managed Highly Available cluster on Azure

###### Auto generated by spf13/cobra on 24-Aug-2024
###### Auto generated by spf13/cobra on 1-Dec-2024
7 changes: 6 additions & 1 deletion gen/docs.md/ksctl_delete-cluster_ha-civo.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: ksctl_delete-cluster_ha-civo
description: Command documentation for ksctl_delete-cluster_ha-civo
---

## ksctl delete-cluster ha-civo

Use to delete a self-managed Highly Available cluster on Civo
Expand Down Expand Up @@ -42,4 +47,4 @@ ksctl delete ha-civo --name demo --region LON1 --storage store-local
* [ksctl delete-cluster](ksctl_delete-cluster.md) - Use to delete a cluster
* [ksctl delete-cluster ha-civo del-nodes](ksctl_delete-cluster_ha-civo_del-nodes.md) - Use to remove worker nodes in self-managed Highly-Available cluster on Civo

###### Auto generated by spf13/cobra on 24-Aug-2024
###### Auto generated by spf13/cobra on 1-Dec-2024
Loading

0 comments on commit da432a8

Please sign in to comment.