Skip to content

ACE -> KubeDB Platform #216

ACE -> KubeDB Platform

ACE -> KubeDB Platform #216

Workflow file for this run

name: preview-website
on:
pull_request:
branches:
- "*"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
label-detector:
name: Runner Label
runs-on: label-detector
outputs:
runs-on: ${{ steps.detector.outputs.label }}
steps:
- name: Detect Label
id: detector
run: |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idoutputs
echo "label=$(curl -fsSL https://this-is-nats.appscode.ninja/runs-on/${{ github.repository_owner }}?visibility=${{ github.repository_visibility }})" >> $GITHUB_OUTPUT
build:
name: Build
needs: label-detector
runs-on: "${{ needs.label-detector.outputs.runs-on }}"
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: '1.25'
id: go
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install yq
run: |
curl -fsSL -o yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
chmod +x yq
sudo mv yq /usr/local/bin/yq
- name: Install Hugo
run: |
curl -fsSL -o hugo_extended.deb https://github.com/gohugoio/hugo/releases/download/v0.128.2/hugo_extended_0.128.2_linux-amd64.deb
sudo dpkg -i hugo_extended.deb
rm hugo_extended.deb
- name: Install Hugo Tools
run: |
curl -fsSL -o hugo-tools https://github.com/appscodelabs/hugo-tools/releases/download/v0.2.23/hugo-tools-linux-amd64
chmod +x hugo-tools
sudo mv hugo-tools /usr/local/bin/hugo-tools
- name: Clone website repository
env:
GITHUB_USER: 1gtm
GITHUB_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }}
WEBSITE_REPOSITORY: ${{ secrets.WEBSITE_REPOSITORY }}
run: |
url="https://${GITHUB_USER}:${GITHUB_TOKEN}@${WEBSITE_REPOSITORY}.git"
cd $RUNNER_WORKSPACE
git clone --recurse-submodules $url
cd $(basename $WEBSITE_REPOSITORY)
git config user.name "${GITHUB_USER}"
git config user.email "${GITHUB_USER}@appscode.com"
- name: Update docs
env:
GITHUB_USER: 1gtm
GITHUB_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }}
WEBSITE_REPOSITORY: ${{ secrets.WEBSITE_REPOSITORY }}
GOOGLE_CUSTOM_SEARCH_API_KEY: ${{ secrets.GOOGLE_CUSTOM_SEARCH_API_KEY }}
run: |
set -x
export WEBSITE_ROOT=$RUNNER_WORKSPACE/$(basename $WEBSITE_REPOSITORY)
cd $WEBSITE_ROOT
npm install
make assets
hugo-tools update-branch --filename=./data/products/kubedbplatform.json --branch=${{ github.event.pull_request.head.sha }}
rm -rf content/docs
make docs-platform
make gen-prod
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_QA }}'
projectId: kubedb-new-e7965
# target: kubedb-new-e7965
entryPoint: '../website'
env:
FIREBASE_CLI_PREVIEWS: hostingchannels