Skip to content

Commit e12bc06

Browse files
author
Your Name
committed
Use GitHub's default Pages workflow with v1 of upload-pages-artifact
1 parent d73e8a9 commit e12bc06

File tree

1 file changed

+16
-20
lines changed

1 file changed

+16
-20
lines changed

.github/workflows/deploy.yml

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,27 @@
1-
name: Deploy to GitHub Pages
1+
name: Deploy static content to Pages
22

33
on:
4+
# Runs on pushes targeting the default branch
45
push:
5-
branches: [ main ]
6+
branches: ["main"]
7+
8+
# Allows you to run this workflow manually from the Actions tab
69
workflow_dispatch:
710

11+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
812
permissions:
913
contents: read
1014
pages: write
1115
id-token: write
1216

17+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
18+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
1319
concurrency:
1420
group: "pages"
1521
cancel-in-progress: false
1622

1723
jobs:
24+
# Single deploy job since we're just deploying
1825
deploy:
1926
environment:
2027
name: github-pages
@@ -23,31 +30,20 @@ jobs:
2330
steps:
2431
- name: Checkout
2532
uses: actions/checkout@v4
26-
2733
- name: Setup Pages
2834
uses: actions/configure-pages@v4
29-
30-
- name: Create simple static page
35+
- name: Build
3136
run: |
3237
mkdir -p _site/svg
33-
34-
# Create placeholder SVGs
3538
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
3639
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
37-
38-
# Create index.html without heredoc
39-
echo '<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>The House that Code Built</title><style>body{font-family:sans-serif;max-width:1200px;margin:0 auto;padding:20px}.three-column-layout{display:flex;width:100%}.left-column{width:25%}.center-column{width:55%}.right-column{width:20%}</style></head><body><h1>The House that Code Built</h1><div class="three-column-layout"><div class="left-column"><h2>Left Column (25%)</h2><p>About this project</p></div><div class="center-column"><h2>Center Column (55%)</h2><img src="svg/environment-layer.svg" alt="Environment" style="width:100%"></div><div class="right-column"><h2>Right Column (20%)</h2><p>View the <a href="https://github.com/TortoiseWolfe/The_House_that_Code_Built">GitHub repo</a></p></div></div></body></html>' > _site/index.html
40-
41-
# Debug output
42-
echo "Generated files:"
43-
ls -la _site/
44-
ls -la _site/svg/
45-
40+
echo '<!DOCTYPE html><html><head><title>Three-Column Layout</title><style>body{margin:0;padding:0;font-family:Arial}.container{display:flex;width:100%}.left{width:25%;background:#f0f0f0;padding:20px}.middle{width:55%;padding:20px}.right{width:20%;background:#f0f0f0;padding:20px}</style></head><body><div class="container"><div class="left"><h2>Left Column (25%)</h2><p>Left content</p></div><div class="middle"><h2>Middle Column (55%)</h2><img src="svg/environment-layer.svg" width="100%"></div><div class="right"><h2>Right Column (20%)</h2><p>Right content</p></div></div></body></html>' > _site/index.html
41+
echo "Debug - Directory contents:"
42+
find _site -type f | sort
4643
- name: Upload artifact
47-
uses: actions/upload-pages-artifact@v3
44+
uses: actions/upload-pages-artifact@v1
4845
with:
49-
path: '_site'
50-
46+
path: _site
5147
- name: Deploy to GitHub Pages
5248
id: deployment
53-
uses: actions/deploy-pages@v3
49+
uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)