Skip to content

Commit e0f8d9c

Browse files
committed
fix: stop building _print pages in Hugo build (#16)
Signed-off-by: Dhevika <[email protected]>
1 parent 38547bd commit e0f8d9c

1 file changed

Lines changed: 26 additions & 29 deletions

File tree

.github/workflows/build-and-release.yml

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ on:
44
workflow_dispatch:
55
inputs:
66
orgId:
7-
description: 'Organization ID (see https://cloud.layer5.io/identity/organizations for ID)'
7+
description:
8+
'Organization ID (see https://cloud.layer5.io/identity/organizations
9+
for ID)'
810
required: false
911
type: string
1012
version:
@@ -13,7 +15,8 @@ on:
1315
default: 'latest'
1416
type: string
1517
academy-name:
16-
description: 'The name of the Academy being updated (e.g., Layer5 Academy)'
18+
description:
19+
'The name of the Academy being updated (e.g., Layer5 Academy)'
1720
required: false
1821
default: 'Academy'
1922
type: string
@@ -53,11 +56,10 @@ jobs:
5356
fi
5457
5558
echo "✅ Found module for orgId '$ORG_ID': $MODULE"
56-
57-
# Set environment variables for later steps
59+
5860
echo "ACADEMY_NAME=${MODULE##*/}" >> $GITHUB_ENV
5961
echo "NOTES=Updated from academy-build workflow" >> $GITHUB_ENV
60-
62+
6163
make update-module module="$MODULE" version="$VERSION"
6264
make update-org-to-module-version orgId="$ORG_ID" version="$VERSION"
6365
@@ -69,15 +71,15 @@ jobs:
6971
7072
- name: Ensure environment variables are set
7173
run: |
72-
# Set defaults if variables are not already set
7374
echo "ACADEMY_NAME=${ACADEMY_NAME:-Layer5 Academy}" >> $GITHUB_ENV
7475
echo "NOTES=${NOTES:-Build from academy-build workflow}" >> $GITHUB_ENV
7576
7677
- name: Install dependencies
7778
run: make setup
7879

80+
# ✅ FIX APPLIED HERE
7981
- name: Build Academy
80-
run: make prod-build
82+
run: make prod-build HUGO_ARGS="--disableKinds=page"
8183

8284
- name: Pull changes from self master
8385
run: git pull origin master
@@ -88,8 +90,9 @@ jobs:
8890
commit_options: '--signoff'
8991
branch: master
9092
commit_user_name: l5io
91-
commit_user_email: [email protected]
92-
commit_author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
93+
commit_user_email: [email protected]
94+
commit_author:
95+
${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
9396

9497
- name: Checkout meshery-cloud repo
9598
uses: actions/checkout@v5
@@ -104,20 +107,7 @@ jobs:
104107
rm -rf meshery-cloud/academy
105108
mkdir -p meshery-cloud/academy
106109
rsync -av --delete public/ meshery-cloud/academy/
107-
cp academy_config.json meshery-cloud/academy/
108-
109-
# - name: Commit & push academy to meshery-cloud
110-
# uses: stefanzweifel/git-auto-commit-action@v5
111-
# with:
112-
# commit_message: "[Academy] Content update for orgId: ${{ github.event.inputs.orgId || 'manual' }}"
113-
# commit_options: '--signoff'
114-
# repository: meshery-cloud
115-
# branch: academy/content-update
116-
# file_pattern: academy
117-
# commit_user_name: l5io
118-
# commit_user_email: [email protected]
119-
# env:
120-
# GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
110+
cp academy_config.json meshery-cloud/academy/
121111
122112
- name: Create PR in meshery-cloud for release-drafter integration
123113
if: github.event.inputs.version != ''
@@ -126,17 +116,24 @@ jobs:
126116
with:
127117
token: ${{ secrets.GH_ACCESS_TOKEN }}
128118
path: meshery-cloud
129-
commit-message: "[Academy] Academy content update v${{ github.event.inputs.version }}"
130-
# committer: l5io
119+
commit-message:
120+
'[Academy] Academy content update v${{ github.event.inputs.version
121+
}}'
131122
signoff: true
132-
title: "${{ inputs.academy-name || github.event.inputs.academy-name }} ${{ github.event.inputs.version }} content update"
133-
body: "Automated PR for ${{ inputs.academy-name || github.event.inputs.academy-name }} ${{ github.event.inputs.version }} (organization: ${{ github.event.inputs.orgId || 'manual' }})."
134-
# branch: academy-${{ github.event.inputs.version }}-${{ github.run_number }}
123+
title:
124+
'${{ inputs.academy-name || github.event.inputs.academy-name }} ${{
125+
github.event.inputs.version }} content update'
126+
body:
127+
"Automated PR for ${{ inputs.academy-name ||
128+
github.event.inputs.academy-name }} ${{ github.event.inputs.version
129+
}} (organization: ${{ github.event.inputs.orgId || 'manual' }})."
135130
labels: academy
136131
delete-branch: true
137132

138133
- name: Enable auto-merge for PR in meshery-cloud repo
139-
if: github.event.inputs.version != '' && steps.cpr.outputs.pull-request-number != ''
134+
if:
135+
github.event.inputs.version != '' &&
136+
steps.cpr.outputs.pull-request-number != ''
140137
uses: peter-evans/enable-pull-request-automerge@v3
141138
with:
142139
token: ${{ secrets.GH_ACCESS_TOKEN }}

0 commit comments

Comments
 (0)