Skip to content

Commit 98965f8

Browse files
authored
Switch to hugo (#118)
Signed-off-by: Tamal Saha <tamal@appscode.com>
1 parent 7fd756a commit 98965f8

472 files changed

Lines changed: 1296 additions & 13553 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc

Lines changed: 0 additions & 6 deletions
This file was deleted.

.eslintrc-auto-import.json

Lines changed: 0 additions & 68 deletions
This file was deleted.

.firebaserc

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 93 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: CI
33
on:
44
pull_request:
55
branches:
6-
- '*'
6+
- "*"
77
push:
88
branches:
99
- master
@@ -30,32 +30,102 @@ jobs:
3030
name: Build
3131
needs: label-detector
3232
runs-on: "${{ needs.label-detector.outputs.runs-on }}"
33-
3433
steps:
3534
- uses: actions/checkout@v4
36-
with:
37-
persist-credentials: false
3835

39-
- uses: actions/setup-node@v4
36+
- name: Install kubectl
37+
run: |
38+
curl -LO https://dl.k8s.io/release/v1.32.1/bin/linux/amd64/kubectl
39+
chmod +x ./kubectl
40+
sudo mv ./kubectl /usr/local/bin/kubectl
41+
42+
- name: Install link checker
43+
run: |
44+
curl -fsSL -o liche https://github.com/appscodelabs/liche/releases/download/v0.1.0/liche-linux-amd64
45+
chmod +x liche
46+
sudo mv liche /usr/local/bin/liche
47+
48+
- name: Install codespan schema checker
49+
run: |
50+
curl -fsSL -o codespan-schema-checker https://github.com/kmodules/codespan-schema-checker/releases/latest/download/codespan-schema-checker-linux-amd64
51+
chmod +x codespan-schema-checker
52+
sudo mv codespan-schema-checker /usr/local/bin/codespan-schema-checker
53+
54+
- name: Create Kubernetes cluster
55+
id: kind
56+
uses: engineerd/setup-kind@v0.5.0
4057
with:
41-
node-version: '22'
42-
check-latest: true
58+
version: v0.31.0
4359

44-
- name: Prepare git
45-
env:
46-
GITHUB_USER: 1gtm
47-
GITHUB_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }}
60+
- name: Prepare cluster for testing
61+
id: local-path
4862
run: |
49-
set -x
50-
git config --global user.name "${GITHUB_USER}"
51-
git config --global user.email "${GITHUB_USER}@appscode.com"
52-
git config --global \
53-
url."https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com".insteadOf \
54-
"https://github.com"
55-
56-
- name: Build
57-
env:
58-
CI: true
63+
echo "waiting for nodes to be ready ..."
64+
kubectl wait --for=condition=Ready nodes --all --timeout=5m
65+
kubectl get nodes
66+
echo
67+
echo "install helm 3"
68+
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
69+
echo "install kubedb-crds chart"
70+
helm repo add appscode https://charts.appscode.com/stable/
71+
helm repo update
72+
# helm install kubedb-crds appscode/kubedb-crds
73+
# helm install kmodules-crds appscode/kmodules-crds
74+
kubectl create -f https://github.com/cert-manager/cert-manager/releases/download/v1.11.0/cert-manager.crds.yaml
75+
kubectl create -f https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.75.0/stripped-down-crds.yaml
76+
kubectl create -f https://github.com/kmodules/custom-resources/raw/release-1.25/crds/appcatalog.appscode.com_appbindings.yaml
77+
kubectl create -f https://github.com/kmodules/custom-resources/raw/release-1.25/crds/metrics.appscode.com_metricsconfigurations.yaml
78+
kubectl create -f https://github.com/stashed/installer/raw/master/crds/stash-crds.yaml
79+
kubectl create -f https://github.com/kubevault/installer/raw/master/crds/kubevault-crds.yaml
80+
kubectl create -f https://github.com/kubedb/installer/raw/master/crds/kubedb-crds.yaml
81+
kubectl create -f https://github.com/kubernetes-csi/external-snapshotter/raw/master/client/config/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml
82+
kubectl create -f https://github.com/kubestash/installer/raw/master/crds/kubestash-crds.yaml
83+
kubectl create -f https://github.com/appscode-cloud/catalog/raw/master/crds/catalog.appscode.com_mongodbbindings.yaml
84+
kubectl create -f https://raw.githubusercontent.com/envoyproxy/gateway/refs/heads/main/charts/gateway-helm/charts/crds/crds/generated/gateway.envoyproxy.io_envoyproxies.yaml
85+
kubectl create -f https://github.com/voyagermesh/installer/raw/master/charts/gateway-api/crds/gateway.networking.k8s.io_gatewayclasses.yaml
86+
kubectl create -f https://github.com/fluxcd/helm-controller/raw/main/config/crd/bases/helm.toolkit.fluxcd.io_helmreleases.yaml
87+
kubectl create -f https://github.com/fluxcd/source-controller/raw/main/config/crd/bases/source.toolkit.fluxcd.io_helmrepositories.yaml
88+
kubectl create -f https://github.com/appscode-cloud/catalog/raw/master/crds/catalog.appscode.com_redisbindings.yaml
89+
# distributed crds
90+
kubectl create -f https://github.com/kube-slice/apis/raw/release-v2025.7.31/crd/controller.kubeslice.io_clusters.yaml
91+
kubectl create -f https://github.com/kube-slice/apis/raw/release-v2025.7.31/crd/controller.kubeslice.io_projects.yaml
92+
kubectl create -f https://github.com/kube-slice/apis/raw/release-v2025.7.31/crd/controller.kubeslice.io_sliceconfigs.yaml
93+
kubectl create -f https://github.com/kubeops/petset/raw/master/crds/apps.k8s.appscode.com_placementpolicies.yaml
94+
kubectl create -f https://github.com/open-cluster-management-io/api/raw/main/operator/v1/0000_00_operator.open-cluster-management.io_klusterlets.crd.yaml
95+
kubectl create -f https://raw.githubusercontent.com/open-cluster-management-io/api/refs/heads/main/addon/v1alpha1/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml
96+
# virtual-secrets crds
97+
kubectl create -f https://raw.githubusercontent.com/kubernetes-sigs/secrets-store-csi-driver/refs/heads/main/charts/secrets-store-csi-driver/crds/secrets-store.csi.x-k8s.io_secretproviderclasses.yaml
98+
kubectl create -f https://raw.githubusercontent.com/virtual-secrets/apimachinery/refs/heads/master/crds/config.virtual-secrets.dev_secretmetadatas.yaml
99+
kubectl create -f https://raw.githubusercontent.com/virtual-secrets/apimachinery/refs/heads/master/crds/config.virtual-secrets.dev_secretstores.yaml
100+
kubectl create -f https://raw.githubusercontent.com/virtual-secrets/apimachinery/refs/heads/master/crds/virtual-secrets.dev_secretmounts.yaml
101+
kubectl create -f https://raw.githubusercontent.com/virtual-secrets/apimachinery/refs/heads/master/crds/virtual-secrets.dev_secrets.yaml
102+
103+
- name: Check codespan schema
104+
run: |
105+
git clone https://github.com/kubedb/installer.git
106+
cd installer
107+
git checkout $(git describe --tags --abbrev=0 2>/dev/null || echo master)
108+
cd ..
109+
git clone https://github.com/kmodules/resource-metadata.git
110+
mv resource-metadata/hub /tmp
111+
rm -rf resource-metadata
112+
codespan-schema-checker --kubedb-catalog-dir=./installer/catalog/kubedb --content=./docs
113+
114+
- name: Check links
59115
run: |
60-
npm ci
61-
npm run build
116+
liche -r docs -d $(pwd) -c 10 -p -h -l -x '^(.*golang.org.*|.*github.com.*|.*api.slack.com.*|.*twitter.com.*|.*linode.com.*|.*helm.sh.*|.*k8s.io.*|.*percona.com.*|.*kubernetes.io.*|.*search-guard.com.*|.*hub.docker.com.*|.*appscode.com.*|.*mongodb.com.*|.*community.arm.com.*|.*cluster.com.*|.*proxysql.com.*|.*postgresql.org.*|.*kafka.com.*|.*stackoverflow.com.*|.*redis.io.*|.*elastic.co.*|.*mysql.*|.*developer.hashicorp.com.*|.*pgpool.net.*|.*clickhouse.com.*)$'
117+
max_retries=5
118+
retry_count=0
119+
while [ $retry_count -lt $max_retries ]; do
120+
if liche -r docs -d $(pwd) -c 10 -p -h -l -x '^(.*golang.org.*|.*github.com.*|.*api.slack.com.*|.*twitter.com.*|.*linode.com.*|.*helm.sh.*|.*k8s.io.*|.*percona.com.*|.*kubernetes.io.*|.*search-guard.com.*|.*hub.docker.com.*|.*appscode.com.*|.*mongodb.com.*|.*community.arm.com.*|.*cluster.com.*|.*proxysql.com.*|.*postgresql.org.*|.*kafka.com.*|.*stackoverflow.com.*|.*redis.io.*|.*elastic.co.*|.*mysql.*|.*developer.hashicorp.com.*|.*pgpool.net.*|.*clickhouse.com.*)$'; then
121+
echo "Link check passed"
122+
exit 0
123+
fi
124+
retry_count=$((retry_count + 1))
125+
if [ $retry_count -lt $max_retries ]; then
126+
echo "Link check failed, retrying... (attempt $((retry_count + 1))/$max_retries)"
127+
sleep 5
128+
fi
129+
done
130+
echo "Link check failed after $max_retries attempts"
131+
exit 1

.github/workflows/preview-website.yml

Lines changed: 49 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,37 +30,73 @@ jobs:
3030
steps:
3131
- uses: actions/checkout@v4
3232
with:
33-
persist-credentials: false
33+
submodules: true
34+
35+
- name: Set up Go 1.x
36+
uses: actions/setup-go@v5
37+
with:
38+
go-version: '1.25'
39+
id: go
3440

3541
- name: Use Node.js
3642
uses: actions/setup-node@v4
3743
with:
38-
node-version: '22'
39-
check-latest: true
44+
node-version: '20'
45+
46+
- name: Install yq
47+
run: |
48+
curl -fsSL -o yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
49+
chmod +x yq
50+
sudo mv yq /usr/local/bin/yq
4051
41-
- name: Prepare git
52+
- name: Install Hugo
53+
run: |
54+
curl -fsSL -o hugo_extended.deb https://github.com/gohugoio/hugo/releases/download/v0.128.2/hugo_extended_0.128.2_linux-amd64.deb
55+
sudo dpkg -i hugo_extended.deb
56+
rm hugo_extended.deb
57+
58+
- name: Install Hugo Tools
59+
run: |
60+
curl -fsSL -o hugo-tools https://github.com/appscodelabs/hugo-tools/releases/download/v0.2.23/hugo-tools-linux-amd64
61+
chmod +x hugo-tools
62+
sudo mv hugo-tools /usr/local/bin/hugo-tools
63+
64+
- name: Clone website repository
4265
env:
4366
GITHUB_USER: 1gtm
4467
GITHUB_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }}
68+
WEBSITE_REPOSITORY: ${{ secrets.WEBSITE_REPOSITORY }}
4569
run: |
46-
set -x
47-
git config --global user.name "${GITHUB_USER}"
48-
git config --global user.email "${GITHUB_USER}@appscode.com"
49-
git config --global \
50-
url."https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com".insteadOf \
51-
"https://github.com"
70+
url="https://${GITHUB_USER}:${GITHUB_TOKEN}@${WEBSITE_REPOSITORY}.git"
71+
cd $RUNNER_WORKSPACE
72+
git clone --recurse-submodules $url
73+
cd $(basename $WEBSITE_REPOSITORY)
74+
git config user.name "${GITHUB_USER}"
75+
git config user.email "${GITHUB_USER}@appscode.com"
5276
5377
- name: Update docs
78+
env:
79+
GITHUB_USER: 1gtm
80+
GITHUB_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }}
81+
WEBSITE_REPOSITORY: ${{ secrets.WEBSITE_REPOSITORY }}
82+
GOOGLE_CUSTOM_SEARCH_API_KEY: ${{ secrets.GOOGLE_CUSTOM_SEARCH_API_KEY }}
5483
run: |
55-
npm ci
56-
npm run build
84+
set -x
85+
export WEBSITE_ROOT=$RUNNER_WORKSPACE/$(basename $WEBSITE_REPOSITORY)
86+
cd $WEBSITE_ROOT
87+
npm install
88+
make assets
89+
hugo-tools update-branch --filename=./data/products/kubedbplatform.json --branch=${{ github.event.pull_request.head.sha }}
90+
rm -rf content/docs
91+
make docs-platform
92+
make gen-prod
5793
5894
- uses: FirebaseExtended/action-hosting-deploy@v0
5995
with:
6096
repoToken: '${{ secrets.GITHUB_TOKEN }}'
6197
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_QA }}'
6298
projectId: kubedb-new-e7965
6399
# target: kubedb-new-e7965
64-
# entryPoint: '.'
100+
entryPoint: '../website'
65101
env:
66102
FIREBASE_CLI_PREVIEWS: hostingchannels

.github/workflows/release-tracker.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ jobs:
2626
name: Build
2727
needs: label-detector
2828
runs-on: "${{ needs.label-detector.outputs.runs-on }}"
29-
3029
steps:
3130
- uses: actions/checkout@v4
3231

0 commit comments

Comments
 (0)