Skip to content

Commit e435242

Browse files
author
Your Name
committed
check
1 parent c932792 commit e435242

File tree

1 file changed

+81
-80
lines changed

1 file changed

+81
-80
lines changed

.github/workflows/deploy.yml

Lines changed: 81 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -15,96 +15,97 @@ jobs:
1515
- name: Checkout
1616
uses: actions/checkout@v4
1717

18+
- name: Setup Pages
19+
id: pages
20+
uses: actions/configure-pages@v4
21+
1822
- name: Create site directory
1923
run: mkdir -p _site
2024

21-
- name: Debug directory structure
22-
run: |
23-
echo "Repository contents:"
24-
ls -la
25-
26-
- name: Copy SVG assets
25+
- name: Prepare SVG assets
2726
run: |
27+
mkdir -p _site/svg
2828
if [ -d "_svg_assets" ]; then
29-
mkdir -p _site/svg
3029
cp -r _svg_assets/* _site/svg/
31-
echo "SVG assets copied successfully:"
32-
ls -la _site/svg/
30+
echo "SVG assets copied"
3331
else
34-
echo "WARNING: _svg_assets directory not found"
35-
mkdir -p _site/svg
36-
# Create placeholder SVGs
32+
echo "Creating placeholder SVGs"
3733
echo '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect width="100" height="100" fill="none" stroke="#000"/><text x="50" y="50" text-anchor="middle">Structure</text></svg>' > _site/svg/house-structure.svg
3834
echo '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect width="100" height="100" fill="none" stroke="#000"/><text x="50" y="50" text-anchor="middle">Environment</text></svg>' > _site/svg/environment-layer.svg
3935
fi
4036
41-
- name: Create HTML file
37+
- name: Write HTML header
4238
run: |
43-
# Create simple index.html
44-
cat > _site/index.html << 'EOL'
45-
<!DOCTYPE html>
46-
<html lang="en">
47-
<head>
48-
<meta charset="UTF-8">
49-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
50-
<meta name="description" content="The House that Code Built - Interactive Learning Tool">
51-
<meta name="author" content="TortoiseWolfe">
52-
<title>The House that Code Built</title>
53-
<style>
54-
body {
55-
margin: 0;
56-
padding: 0;
57-
font-family: Arial, sans-serif;
58-
}
59-
.container {
60-
display: flex;
61-
width: 100%;
62-
}
63-
.left-column {
64-
width: 25%;
65-
flex: 0 0 25%;
66-
background: #f0f0f0;
67-
padding: 15px;
68-
box-sizing: border-box;
69-
}
70-
.center-column {
71-
width: 55%;
72-
flex: 0 0 55%;
73-
padding: 15px;
74-
box-sizing: border-box;
75-
}
76-
.right-column {
77-
width: 20%;
78-
flex: 0 0 20%;
79-
background: #f0f0f0;
80-
padding: 15px;
81-
box-sizing: border-box;
82-
}
83-
</style>
84-
</head>
85-
<body>
86-
<div class="container">
87-
<div class="left-column">
88-
<h2>Presets</h2>
89-
<p>Left column (25%)</p>
90-
</div>
91-
<div class="center-column">
92-
<h2>Visualization</h2>
93-
<img src="svg/house-structure.svg" alt="House Structure" width="100%">
94-
<img src="svg/environment-layer.svg" alt="Environment Layer" width="100%">
95-
</div>
96-
<div class="right-column">
97-
<h2>Layer Controls</h2>
98-
<p>Right column (20%)</p>
99-
</div>
100-
</div>
101-
</body>
102-
</html>
103-
EOL
104-
105-
- name: Deploy
106-
uses: peaceiris/actions-gh-pages@v3
39+
echo '<!DOCTYPE html>
40+
<html lang="en">
41+
<head>
42+
<meta charset="UTF-8">
43+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
44+
<meta name="description" content="The House that Code Built - Interactive Learning Tool">
45+
<meta name="author" content="TortoiseWolfe">
46+
<title>The House that Code Built</title>
47+
<style>
48+
body {
49+
margin: 0;
50+
padding: 0;
51+
font-family: Arial, sans-serif;
52+
}
53+
.container {
54+
display: flex;
55+
width: 100%;
56+
}
57+
.left-column {
58+
width: 25%;
59+
flex: 0 0 25%;
60+
background: #f0f0f0;
61+
padding: 15px;
62+
box-sizing: border-box;
63+
}
64+
.center-column {
65+
width: 55%;
66+
flex: 0 0 55%;
67+
padding: 15px;
68+
box-sizing: border-box;
69+
}
70+
.right-column {
71+
width: 20%;
72+
flex: 0 0 20%;
73+
background: #f0f0f0;
74+
padding: 15px;
75+
box-sizing: border-box;
76+
}
77+
</style>
78+
</head>
79+
<body>' > _site/index.html
80+
81+
- name: Write HTML body
82+
run: |
83+
echo '
84+
<div class="container">
85+
<div class="left-column">
86+
<h2>Presets</h2>
87+
<p>Left column (25%)</p>
88+
</div>
89+
<div class="center-column">
90+
<h2>Visualization</h2>
91+
<img src="svg/house-structure.svg" alt="House Structure" width="100%">
92+
<img src="svg/environment-layer.svg" alt="Environment Layer" width="100%">
93+
</div>
94+
<div class="right-column">
95+
<h2>Layer Controls</h2>
96+
<p>Right column (20%)</p>
97+
</div>
98+
</div>
99+
</body>
100+
</html>' >> _site/index.html
101+
102+
- name: Upload artifact
103+
uses: actions/upload-pages-artifact@v3
104+
with:
105+
path: _site
106+
107+
- name: Deploy to GitHub Pages
108+
id: deployment
109+
uses: actions/deploy-pages@v4
107110
with:
108-
github_token: ${{ secrets.GITHUB_TOKEN }}
109-
publish_dir: ./_site
110-
force_orphan: true
111+
token: ${{ github.token }}

0 commit comments

Comments
 (0)