Skip to content

Commit b745080

Browse files
author
Your Name
committed
Fix artifact generation in GitHub Pages workflow
1 parent dad2e23 commit b745080

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,39 @@ jobs:
3434
python -m pip install --upgrade pip
3535
pip install flask python-dotenv
3636
37-
- name: Build static site
37+
- name: Create artifact directory
3838
run: |
3939
mkdir -p _site/svg
4040
41+
# Create necessary directories
42+
echo "Creating directories..."
43+
ls -la
44+
4145
# Copy SVG files from _svg_assets if they exist
4246
if [ -d "_svg_assets" ]; then
47+
echo "Found _svg_assets directory, copying files..."
4348
cp _svg_assets/*.svg _site/svg/ || true
49+
else
50+
echo "_svg_assets directory not found"
51+
# Create simple SVG placeholders
52+
echo '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 600"><rect width="800" height="600" fill="none" stroke="#ccc" stroke-width="1"/><text x="400" y="300" font-family="Arial" font-size="24" text-anchor="middle" fill="#999">Environment Layer</text></svg>' > _site/svg/environment-layer.svg
53+
echo '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 600"><rect width="800" height="600" fill="none" stroke="#ccc" stroke-width="1"/><text x="400" y="300" font-family="Arial" font-size="24" text-anchor="middle" fill="#999">House Structure</text></svg>' > _site/svg/house-structure.svg
4454
fi
4555
56+
# Create index.html file
57+
echo "Creating index.html file..."
4658
echo '<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="description" content="An interactive visualization of web development concepts using a house metaphor"><title>The House that Code Built</title><style>:root{--bg-color:#f5f5f5;--text-color:#333;--header-color:#2e7d32;--card-bg:#ffffff;--card-shadow:rgba(0,0,0,0.1);--btn-color:#2196F3;--btn-hover:#1976D2;--btn-text:#ffffff;--focus-outline:#2196F3;}body{font-family:"Segoe UI",Tahoma,Geneva,Verdana,sans-serif;max-width:1200px;margin:0 auto;padding:20px;background-color:var(--bg-color);color:var(--text-color);line-height:1.5;}h1,h2{color:var(--header-color);text-align:center;}.three-column-layout{display:flex;width:100%;margin-bottom:40px;min-height:600px;}.left-column{width:25%;flex:0 0 25%;background-color:var(--card-bg);border-radius:8px;padding:20px;box-shadow:0 2px 10px var(--card-shadow);}.center-column{width:55%;flex:0 0 55%;background-color:var(--card-bg);border-radius:8px;padding:20px;box-shadow:0 2px 10px var(--card-shadow);}.right-column{width:20%;flex:0 0 20%;background-color:var(--card-bg);border-radius:8px;padding:20px;box-shadow:0 2px 10px var(--card-shadow);}.svg-container{width:100%;height:500px;position:relative;}.github-link{margin-top:30px;text-align:center;}.button{display:inline-block;padding:10px 15px;background-color:var(--btn-color);color:var(--btn-text);text-decoration:none;border-radius:4px;font-weight:bold;}.button:hover{background-color:var(--btn-hover);}footer{margin-top:40px;text-align:center;font-size:0.9em;}</style></head><body><h1>The House that Code Built</h1><p style="text-align:center;">An interactive visualization of web development concepts</p><div class="three-column-layout"><div class="left-column"><h2>About This Project</h2><p>This visualization demonstrates web development concepts through the metaphor of a house:</p><ul><li>Environment - The foundation</li><li>HTML - The structure</li><li>CSS - The design</li><li>JavaScript - The interactivity</li><li>Backend - The systems</li></ul></div><div class="center-column"><div class="svg-container"><img src="svg/environment-layer.svg" alt="Environment layer visualization" style="width:100%;height:auto;"><img src="svg/house-structure.svg" alt="House structure visualization" style="width:100%;height:auto;position:absolute;top:0;left:0;"></div></div><div class="right-column"><h2>Interactive Version</h2><p>The full interactive version has:</p><ul><li>Layer toggling</li><li>Chapter navigation</li><li>Tom Waits soundtrack</li><li>Dark/light mode</li></ul><div class="github-link"><a href="https://github.com/TortoiseWolfe/The_House_that_Code_Built" class="button">View on GitHub</a></div></div></div><footer><p>Created by <a href="https://github.com/TortoiseWolfe">TortoiseWolfe</a></p><p>This project follows WCAG 2.1 AA accessibility guidelines</p></footer></body></html>' > _site/index.html
4759
60+
- name: Debug directory
61+
run: |
62+
pwd
63+
ls -la
64+
ls -la _site || echo "_site directory not found"
65+
4866
- name: Upload artifact
4967
uses: actions/upload-pages-artifact@v3
5068
with:
51-
path: './_site'
69+
path: '_site'
5270

5371
deploy:
5472
environment:

0 commit comments

Comments
 (0)