Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 55 additions & 5 deletions code3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,61 @@ jobs:
mkdir -p site
scc . > site/stats.txt

- name: Generate index.html
run: |
echo "<html><head><title>Code Stats</title></head><body><h1>Code Statistics</h1><pre>" > site/index.html
cat site/stats.txt >> site/index.html
echo "</pre></body></html>" >> site/index.html
# înlocuiește pasul anterior cu:
run: |
cat <<EOF > site/index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Code Statistics – GitHub Actions + SCC</title>
<link href="https://fonts.googleapis.com/css2?family=Fira+Code&family=Inter:wght@400;600&display=swap" rel="stylesheet">
<style>
body {
background-color: #111;
color: #f1f1f1;
font-family: 'Inter', sans-serif;
padding: 2rem;
line-height: 1.6;
}
h1 {
font-weight: 600;
font-size: 2rem;
margin-bottom: 1rem;
}
pre {
background-color: #222;
padding: 1rem;
border-radius: 5px;
overflow-x: auto;
font-family: 'Fira Code', monospace;
font-size: 0.9rem;
white-space: pre-wrap;
}
.footer {
margin-top: 3rem;
font-size: 0.8rem;
color: #888;
}
</style>
</head>
<body>
<h1>📊 Code Statistics Report</h1>
<p>This report was automatically generated using <strong>SCC</strong> via GitHub Actions on your latest commit to the <code>main</code> branch.</p>
<pre>
EOF

cat site/stats.txt >> site/index.html

cat <<EOF >> site/index.html
</pre>
<div class="footer">
Generated by <a href="https://github.com/boyter/scc" target="_blank" style="color: #66f;">SCC</a> + <a href="https://github.com/features/actions" target="_blank" style="color: #66f;">GitHub Actions</a> 🚀
</div>
</body>
</html>
EOF

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
Expand Down
48 changes: 36 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,26 +1,50 @@
<!DOCTYPE html>
<<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Test GitHub Pages</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Code Statistics – GitHub Actions + SCC</title>
<link href="https://fonts.googleapis.com/css2?family=Fira+Code&family=Inter:wght@400;600&display=swap" rel="stylesheet">
<style>
body {
font-family: Arial, sans-serif;
background-color: #f2f2f2;
text-align: center;
margin-top: 100px;
background-color: #111;
color: #f1f1f1;
font-family: 'Inter', sans-serif;
padding: 2rem;
line-height: 1.6;
}
h1 {
color: #333;
font-weight: 600;
font-size: 2rem;
margin-bottom: 1rem;
}
p {
color: #666;
pre {
background-color: #222;
padding: 1rem;
border-radius: 5px;
overflow-x: auto;
font-family: 'Fira Code', monospace;
font-size: 0.9rem;
white-space: pre-wrap;
}
.footer {
margin-top: 3rem;
font-size: 0.8rem;
color: #888;
}
</style>
</head>
<body>
<h1>Site-ul funcționează! ✅</h1>
<p>Acesta este un test de GitHub Pages cu <strong>index.html</strong>.</p>
<h1>📊 Code Statistics Report</h1>
<p>This report was automatically generated using <strong>SCC</strong> via GitHub Actions on your latest commit to the <code>main</code> branch.</p>

<pre>
<!-- STATS WILL BE INSERTED HERE -->
Put the output of `scc . > stats.txt` here
</pre>

<div class="footer">
Generated by <a href="https://github.com/boyter/scc" target="_blank" style="color: #66f;">SCC</a> + <a href="https://github.com/features/actions" target="_blank" style="color: #66f;">GitHub Actions</a> 🚀
</div>
</body>
</html>
Loading