this repo has no description

deploy sites

+181 -3
+127
.github/workflows/deploy-sites.yaml
··· 1 + # .github/workflows/deploy-sites.yml 2 + name: Deploy Subdirectories to GitHub Pages 3 + 4 + on: 5 + push: 6 + branches: [main, master] 7 + workflow_dispatch: 8 + 9 + permissions: 10 + contents: read 11 + pages: write 12 + id-token: write 13 + 14 + concurrency: 15 + group: pages 16 + cancel-in-progress: false 17 + 18 + jobs: 19 + discover-sites: 20 + runs-on: ubuntu-latest 21 + outputs: 22 + sites: ${{ steps.find-sites.outputs.sites }} 23 + steps: 24 + - name: Checkout 25 + uses: actions/checkout@v4 26 + 27 + - name: Find site directories 28 + id: find-sites 29 + run: | 30 + # Find all directories containing index.html 31 + sites=() 32 + for dir in */; do 33 + if [ -f "${dir}index.html" ]; then 34 + sites+=("${dir%/}") 35 + fi 36 + done 37 + 38 + # Create JSON array for matrix strategy 39 + sites_json=$(printf '%s\n' "${sites[@]}" | jq -R . | jq -s .) 40 + echo "sites=$sites_json" >> $GITHUB_OUTPUT 41 + echo "Found sites: $sites_json" 42 + 43 + build: 44 + runs-on: ubuntu-latest 45 + needs: discover-sites 46 + strategy: 47 + matrix: 48 + site: ${{ fromJson(needs.discover-sites.outputs.sites) }} 49 + steps: 50 + - name: Checkout 51 + uses: actions/checkout@v4 52 + 53 + - name: Prepare site build 54 + run: | 55 + mkdir -p _site/${{ matrix.site }} 56 + cp -r ${{ matrix.site }}/* _site/${{ matrix.site }}/ 57 + 58 + # Create a root index if it doesn't exist 59 + if [ ! -f "_site/index.html" ]; then 60 + cat > _site/index.html << 'EOF' 61 + <!DOCTYPE html> 62 + <html> 63 + <head> 64 + <title>Sites Index</title> 65 + <style> 66 + body { font-family: system-ui, sans-serif; max-width: 800px; margin: 40px auto; padding: 20px; } 67 + h1 { color: #333; } 68 + ul { list-style: none; padding: 0; } 69 + li { margin: 10px 0; } 70 + a { color: #0366d6; text-decoration: none; font-size: 1.1em; } 71 + a:hover { text-decoration: underline; } 72 + </style> 73 + </head> 74 + <body> 75 + <h1>📁 Available Sites</h1> 76 + <ul id="sites-list"></ul> 77 + <script> 78 + const sites = document.getElementById('sites-list'); 79 + const paths = window.location.pathname.split('/').filter(p => p); 80 + const basePath = paths.length > 0 ? '/' + paths.join('/') : ''; 81 + 82 + fetch(basePath + '/sites.json') 83 + .then(r => r.json()) 84 + .then(data => { 85 + data.forEach(site => { 86 + const li = document.createElement('li'); 87 + const a = document.createElement('a'); 88 + a.href = './' + site + '/'; 89 + a.textContent = site; 90 + li.appendChild(a); 91 + sites.appendChild(li); 92 + }); 93 + }); 94 + </script> 95 + </body> 96 + </html> 97 + EOF 98 + fi 99 + 100 + - name: Upload site artifact 101 + uses: actions/upload-artifact@v4 102 + with: 103 + name: site-${{ matrix.site }} 104 + path: _site 105 + 106 + merge-and-deploy: 107 + runs-on: ubuntu-latest 108 + needs: [discover-sites, build] 109 + steps: 110 + - name: Download all artifacts 111 + uses: actions/download-artifact@v4 112 + with: 113 + path: _site 114 + pattern: site-* 115 + merge-multiple: true 116 + 117 + - name: Create sites index 118 + run: | 119 + echo '${{ needs.discover-sites.outputs.sites }}' > _site/sites.json 120 + 121 + - name: Upload to GitHub Pages 122 + uses: actions/upload-pages-artifact@v3 123 + with: 124 + path: _site 125 + 126 + - name: Deploy to GitHub Pages 127 + uses: actions/deploy-pages@v4
intro to html/image.jpg introtohtml/image.jpg
+14 -3
intro to html/intro_to_html.html introtohtml/index.html
··· 1 - <!DOCTYPE html> 1 + <!doctype html> 2 2 <html lang="en"> 3 3 <head> 4 4 <title>This is my website Title</title> 5 5 <meta charset="UTF-8" /> 6 6 <meta name="viewport" content="width=device-width initial-scale=1.0" /> 7 7 <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=default"></script> 8 + <link href="./styles.css" type="text/css" rel="stylesheet" /> 8 9 </head> 9 10 10 11 <body> 11 12 <!-- this is a comment from Matt <@:) --> 12 - <h1 id="top">^_^</h1> 13 + <h1 id="top" style="font-family: &quot;Times New Roman&quot;, Times, serif"> 14 + ^_^ wow 15 + </h1> 13 16 <h2>welcome to website.com</h2> 14 17 <p title="muh title"> 15 18 this <strong>is</strong> a <b>website</b> where I can do ··· 112 115 src="https://www.youtube-nocookie.com/embed/UNYqwpx7Cys" 113 116 title="Music" 114 117 frameborder="0" 115 - allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" 118 + allow=" 119 + accelerometer; 120 + autoplay; 121 + clipboard-write; 122 + encrypted-media; 123 + gyroscope; 124 + picture-in-picture; 125 + web-share; 126 + " 116 127 referrerpolicy="strict-origin-when-cross-origin" 117 128 allowfullscreen 118 129 ></iframe>
introtohtml/background.jpg

This is a binary file and will not be displayed.

+40
introtohtml/styles.css
··· 1 + * { 2 + font-family: Arial, Helvetica, sans-serif; 3 + } 4 + 5 + body { 6 + background-color: cadetblue; 7 + background-image: url("background.jpg"); 8 + background-attachment: fixed; 9 + background-repeat: no-repeat; 10 + background-position: center; 11 + background-size: cover; 12 + } 13 + 14 + p { 15 + color: darkturquoise; 16 + background-color: red; 17 + } 18 + 19 + h1, 20 + h2, 21 + h3, 22 + h4, 23 + h5, 24 + h6 { 25 + text-align: center; 26 + font-style: italic; 27 + } 28 + 29 + img { 30 + border-radius: 10px; 31 + } 32 + 33 + a { 34 + font-style: italic; 35 + color: bisque; 36 + } 37 + a:visited { 38 + font-style: italic; 39 + color: coral; 40 + }