Skip to content

kick

kick #4

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches: [ main ]
paths:
- 'README.md'
- 'docs/**'
- '.github/workflows/github-pages.yml'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install markdown processor
run: |
npm install -g marked
npm install -g marked-gfm-heading-id
npm install -g marked-highlight
- name: Convert README to HTML
run: |
cat > convert.js << 'EOF'
const fs = require('fs');
const { marked } = require('marked');
const { gfmHeadingId } = require('marked-gfm-heading-id');
const { markedHighlight } = require('marked-highlight');
const hljs = require('highlight.js');
marked.use(gfmHeadingId());
marked.use(markedHighlight({
langPrefix: 'hljs language-',
highlight(code, lang) {
const language = hljs.getLanguage(lang) ? lang : 'plaintext';
return hljs.highlight(code, { language }).value;
}
}));
const readme = fs.readFileSync('README.md', 'utf8');
// Convert README content
const content = marked(readme);
// Create full HTML page
const html = `<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Wind Turbine Data Pipeline - Aerolake</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css">
<style>
:root {
--primary: #2563eb;
--primary-dark: #1e40af;
--text: #1e293b;
--text-muted: #64748b;
--bg: #ffffff;
--bg-secondary: #f8fafc;
--border: #e2e8f0;
--code-bg: #1e293b;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
line-height: 1.6;
color: var(--text);
background: var(--bg-secondary);
min-height: 100vh;
.container {
max-width: 1400px;
margin: 0 auto;
background: var(--bg);
}
.header-banner {
background: var(--bg);
border-bottom: 3px solid var(--primary);
padding: 40px;
text-align: center;
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.header-banner h1 {
font-size: 2.5em;
margin-bottom: 10px;
color: var(--text);
}
.header-banner p {
font-size: 1.2em;
color: var(--text-muted);
}
.nav-links {
background: var(--bg-secondary);
padding: 20px;
text-align: center;
border-bottom: 1px solid var(--border);
}
.nav-links a {
display: inline-block;
padding: 10px 20px;
margin: 5px;
background: var(--primary);
color: white;
text-decoration: none;
border-radius: 4px;
transition: background 0.2s;
}
.nav-links a:hover {
background: var(--primary-dark);
}
.content {
padding: 40px;
}
h1, h2, h3, h4, h5, h6 {
color: var(--text);
margin: 30px 0 15px 0;
}
h1 { border-bottom: 2px solid var(--primary); padding-bottom: 10px; }
h2 { border-bottom: 1px solid var(--border); padding-bottom: 8px; }
pre {
background: var(--code-bg);
color: #e2e8f0;
padding: 20px;
border-radius: 5px;
overflow-x: auto;
margin: 20px 0;
}
code {
background: var(--code-bg);
color: #48bb78;
padding: 2px 6px;
border-radius: 3px;
font-family: 'Courier New', monospace;
}
pre code {
background: transparent;
padding: 0;
}
blockquote {
border-left: 4px solid var(--primary);
padding-left: 20px;
margin: 20px 0;
color: #718096;
background: var(--bg);
padding: 20px;
border-radius: 5px;
}
ul, ol {
margin: 15px 0;
padding-left: 30px;
}
li {
margin: 8px 0;
}
table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
}
th, td {
border: 1px solid #e2e8f0;
padding: 12px;
text-align: left;
}
th {
background: var(--bg);
font-weight: 600;
}
tr:nth-child(even) {
background: #f8fafc;
}
a {
color: var(--primary);
text-decoration: none;
transition: color 0.3s;
}
a:hover {
color: var(--secondary);
text-decoration: underline;
}
.footer {
background: var(--bg);
padding: 30px;
text-align: center;
border-top: 1px solid #e2e8f0;
color: #718096;
}
.mermaid {
background: white;
padding: 20px;
border-radius: 5px;
margin: 20px 0;
}
@media (max-width: 768px) {
.header-banner h1 {
font-size: 1.8em;
}
.content {
padding: 20px;
}
}
</style>
</head>
<body>
<div class="container">
<div class="header-banner">
<h1>🌬️ Aerolake Wind Turbine Data Pipeline</h1>
<p>Environmental Sensor Data Processing with Databricks & Expanso</p>
</div>
<div class="nav-links">
<a href="https://aerolake.org/schemas/viewer.html">πŸ“‹ Schema Viewer</a>
<a href="https://aerolake.org/schemas/wind-turbine-v1.json">πŸ“„ JSON Schema</a>
<a href="https://github.com/aerolake/databricks-wind-turbines">πŸ”— GitHub</a>
<a href="https://aerolake.org/schemas/">πŸ“ Schema Docs</a>
</div>
<div class="content">
${content}
</div>
<div class="footer">
<p>Wind Turbine Data Pipeline | Auto-generated from README.md</p>
<p>Last updated: ${new Date().toISOString()}</p>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js"></script>
<script>
mermaid.initialize({ startOnLoad: true });
</script>
</body>
</html>`;
fs.writeFileSync('docs/index.html', html);
console.log('βœ… Converted README.md to docs/index.html');
EOF
npm install marked marked-gfm-heading-id marked-highlight highlight.js
node convert.js
- name: Move schema documentation
run: |
# Keep schemas in subdirectory
mkdir -p docs/schemas
# Schema files are already in docs/schemas from the repo
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4