Skip to content

Commit c37cf90

Browse files
author
Your Name
committed
Completely rewrite GitHub workflow file to fix YAML syntax
1 parent 5d6407b commit c37cf90

File tree

1 file changed

+19
-65
lines changed

1 file changed

+19
-65
lines changed

.github/workflows/deploy.yml

Lines changed: 19 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -36,39 +36,22 @@ jobs:
3636
python -m pip install --upgrade pip
3737
cd House_Code
3838
pip install -r requirements.txt
39-
# Ensure jinja2 is installed for the static site generator
4039
pip install jinja2
41-
42-
- name: Create test SVG files if needed
40+
41+
- name: Create SVG directories
4342
run: |
44-
echo "Creating SVG test directories if they don't exist"
4543
mkdir -p _svg_assets
4644
mkdir -p House_Code/static/svg
45+
46+
- name: Create environment layer SVG
47+
run: |
48+
echo '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 600"><rect width="800" height="600" fill="#e6f7ff" /><text x="400" y="300" font-family="Arial" font-size="48" text-anchor="middle" fill="#333">Environment Layer</text></svg>' > House_Code/static/svg/environment-layer.svg
49+
50+
- name: Create house structure SVG
51+
run: |
52+
echo '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 600"><rect width="800" height="600" fill="none" stroke="#333" stroke-width="2" /><polygon points="400,100 200,300 600,300" fill="#f5deb3" stroke="#333" stroke-width="2" /><rect x="250" y="300" width="300" height="200" fill="#f5deb3" stroke="#333" stroke-width="2" /><text x="400" y="450" font-family="Arial" font-size="48" text-anchor="middle" fill="#333">House Structure</text></svg>' > House_Code/static/svg/house-structure.svg
4753
48-
# Create placeholder SVGs for testing if none exist
49-
if [ ! -f "House_Code/static/svg/environment-layer.svg" ]; then
50-
echo "Creating test SVG file: environment-layer.svg"
51-
cat > House_Code/static/svg/environment-layer.svg << 'EOFSVG1'
52-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 600">
53-
<rect width="800" height="600" fill="#e6f7ff" />
54-
<text x="400" y="300" font-family="Arial" font-size="48" text-anchor="middle" fill="#333">Environment Layer</text>
55-
</svg>
56-
EOFSVG1
57-
fi
58-
59-
if [ ! -f "House_Code/static/svg/house-structure.svg" ]; then
60-
echo "Creating test SVG file: house-structure.svg"
61-
cat > House_Code/static/svg/house-structure.svg << 'EOFSVG2'
62-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 600">
63-
<rect width="800" height="600" fill="none" stroke="#333" stroke-width="2" />
64-
<polygon points="400,100 200,300 600,300" fill="#f5deb3" stroke="#333" stroke-width="2" />
65-
<rect x="250" y="300" width="300" height="200" fill="#f5deb3" stroke="#333" stroke-width="2" />
66-
<text x="400" y="450" font-family="Arial" font-size="48" text-anchor="middle" fill="#333">House Structure</text>
67-
</svg>
68-
EOFSVG2
69-
fi
70-
71-
- name: Debug current directory structure
54+
- name: Debug directory structure
7255
run: |
7356
echo "Contents of working directory:"
7457
ls -la
@@ -78,49 +61,20 @@ EOFSVG2
7861
ls -la House_Code/templates/
7962
echo "Contents of static directory:"
8063
ls -la House_Code/static/
81-
echo "Contents of _svg_assets directory:"
82-
ls -la _svg_assets/
64+
echo "Contents of SVG directory:"
65+
ls -la House_Code/static/svg/
8366
8467
- name: Generate static site
8568
run: |
86-
echo "Current working directory: $(pwd)"
87-
# Create debugging info
8869
cd House_Code
70+
python generate_static_site.py
8971
90-
echo "Looking for templates directory:"
91-
ls -la templates || echo "Templates directory not found!"
92-
93-
echo "Looking for static directory:"
94-
ls -la static || echo "Static directory not found!"
72+
echo "Checking generated static site:"
73+
ls -la gh-pages
74+
ls -la gh-pages/svg
9575
96-
echo "Python and Jinja2 versions:"
97-
python -c "import sys; print(f'Python version: {sys.version}')"
98-
python -c "import jinja2; print(f'Jinja2 version: {jinja2.__version__}')" || echo "Jinja2 not installed properly!"
99-
100-
echo "Running static site generator with verbose output:"
101-
python -v generate_static_site.py
102-
103-
echo "Static site generation complete, checking results:"
104-
if [ -d "gh-pages" ]; then
105-
echo "gh-pages directory exists:"
106-
ls -la gh-pages
107-
if [ -d "gh-pages/svg" ]; then
108-
echo "SVG directory exists:"
109-
ls -la gh-pages/svg
110-
111-
echo "HTML file content (first 40 lines to check for SVG references):"
112-
head -n 40 gh-pages/index.html | grep -A 5 -B 5 "svgObject.data" || echo "No SVG references found in first 40 lines"
113-
114-
# Check for any SVG references in the HTML
115-
echo "All SVG references in HTML:"
116-
grep -o "svgObject.data.*svg" gh-pages/index.html || echo "No SVG references found"
117-
else
118-
echo "ERROR: SVG directory not found!"
119-
fi
120-
else
121-
echo "ERROR: gh-pages directory not found!"
122-
exit 1
123-
fi
76+
echo "Checking SVG references in HTML:"
77+
grep -o "svgObject.data.*svg" gh-pages/index.html || echo "No SVG references found"
12478
12579
- name: Upload artifact
12680
uses: actions/upload-pages-artifact@v3

0 commit comments

Comments
 (0)