Skip to content

Commit 413a7e2

Browse files
InfoTech.io Botclaude
andcommitted
Fix deploy-sites-fixed.yml to use Hugo Templates Factory
- Replace simple Hugo build with module.json configuration - Remove hardcoded HTML templates in favor of corporate template - Ensure consistent builds across all workflows 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent b3210aa commit 413a7e2

1 file changed

Lines changed: 9 additions & 97 deletions

File tree

.github/workflows/deploy-sites-fixed.yml

Lines changed: 9 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -73,106 +73,18 @@ jobs:
7373
run: |
7474
echo "🏢 Building Corporate Site..."
7575
76-
# Create a simple Hugo site for corporate content
77-
mkdir -p corporate-site
78-
cd corporate-site
79-
80-
# Initialize Hugo site
81-
hugo new site . --force
82-
83-
# Copy content
84-
if [ -d "../content-corporate/docs/content" ]; then
85-
cp -r ../content-corporate/docs/content/* ./content/ 2>/dev/null || echo "No content to copy"
86-
fi
87-
88-
# Create simple config
89-
cat > hugo.toml << EOF
90-
baseURL = 'https://info-tech-io.github.io'
91-
languageCode = 'ru'
92-
title = 'InfoTech.io - Open Source Educational Technology'
93-
theme = ''
94-
95-
[markup]
96-
[markup.goldmark]
97-
[markup.goldmark.renderer]
98-
unsafe = true
99-
EOF
100-
101-
# Create simple layout
102-
mkdir -p layouts/_default
103-
cat > layouts/_default/baseof.html << 'EOF'
104-
<!DOCTYPE html>
105-
<html>
106-
<head>
107-
<meta charset="utf-8">
108-
<title>{{ .Title }} - InfoTech.io</title>
109-
<meta name="description" content="{{ .Description | default .Summary }}">
110-
<style>
111-
body { font-family: Arial, sans-serif; margin: 40px; line-height: 1.6; }
112-
.container { max-width: 800px; margin: 0 auto; }
113-
.header { color: #333; border-bottom: 2px solid #eee; padding-bottom: 10px; }
114-
nav { margin: 20px 0; }
115-
nav a { margin-right: 15px; text-decoration: none; color: #0066cc; }
116-
.content { margin: 30px 0; }
117-
footer { margin-top: 50px; padding-top: 20px; border-top: 1px solid #eee; color: #666; }
118-
</style>
119-
</head>
120-
<body>
121-
<div class="container">
122-
<header class="header">
123-
<h1><a href="/" style="text-decoration: none; color: inherit;">InfoTech.io</a></h1>
124-
<nav>
125-
<a href="/">Home</a>
126-
<a href="/quiz/">Quiz Engine</a>
127-
<a href="/hugo/">Hugo Templates</a>
128-
<a href="/terminal/">Web Terminal</a>
129-
<a href="/cli/">CLI Tools</a>
130-
</nav>
131-
</header>
132-
133-
<main class="content">
134-
{{ block "main" . }}{{ end }}
135-
</main>
136-
137-
<footer>
138-
<p>🤖 Built with <a href="https://gohugo.io/">Hugo</a> and <a href="https://claude.ai/code">Claude Code</a></p>
139-
</footer>
140-
</div>
141-
</body>
142-
</html>
143-
EOF
144-
145-
cat > layouts/_default/single.html << 'EOF'
146-
{{ define "main" }}
147-
<article>
148-
<h1>{{ .Title }}</h1>
149-
{{ .Content }}
150-
</article>
151-
{{ end }}
152-
EOF
76+
# Checkout content
77+
git clone https://github.com/info-tech-io/info-tech.git content-corporate
15378
154-
cat > layouts/_default/list.html << 'EOF'
155-
{{ define "main" }}
156-
<h1>{{ .Title }}</h1>
157-
{{ .Content }}
158-
{{ range .Pages }}
159-
<article style="margin: 20px 0; padding: 15px; border: 1px solid #eee;">
160-
<h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
161-
<p>{{ .Summary }}</p>
162-
</article>
163-
{{ end }}
164-
{{ end }}
165-
EOF
79+
# Build site using module.json configuration
80+
cd hugo-templates
81+
chmod +x scripts/build.sh
16682
167-
cat > layouts/index.html << 'EOF'
168-
{{ define "main" }}
169-
<h1>{{ .Title }}</h1>
170-
{{ .Content }}
171-
{{ end }}
172-
EOF
83+
# Copy content as module
84+
cp -r ../content-corporate/docs ./module-content
17385
174-
# Build with Hugo
175-
hugo --minify --destination ../build-output
86+
# Build using module.json configuration
87+
scripts/build.sh --config ./module-content/module.json --output ../build-output
17688
17789
echo "✅ Corporate site built"
17890

0 commit comments

Comments
 (0)