Skip to content

Commit 73d9f6c

Browse files
committed
add github pages
1 parent 4f77c56 commit 73d9f6c

9 files changed

Lines changed: 761 additions & 0 deletions

File tree

.github/workflows/github-pages.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Deploy GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'docs/**'
9+
- '.github/workflows/github-pages.yml'
10+
workflow_dispatch:
11+
12+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow only one concurrent deployment
19+
concurrency:
20+
group: "pages"
21+
cancel-in-progress: false
22+
23+
jobs:
24+
deploy:
25+
environment:
26+
name: github-pages
27+
url: ${{ steps.deployment.outputs.page_url }}
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
33+
- name: Setup Pages
34+
uses: actions/configure-pages@v4
35+
36+
- name: Upload artifact
37+
uses: actions/upload-pages-artifact@v3
38+
with:
39+
path: './docs'
40+
41+
- name: Deploy to GitHub Pages
42+
id: deployment
43+
uses: actions/deploy-pages@v4

docs/README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Dota Keeper - GitHub Pages Site
2+
3+
This directory contains the GitHub Pages landing page for Dota Keeper.
4+
5+
## Structure
6+
7+
- `index.html` - Main landing page
8+
- `style.css` - Styles matching the Dota 2 theme
9+
- `script.js` - Dynamic release information fetching
10+
- `screenshot.png` - App screenshot (add your own)
11+
- `assets/` - Icons and other assets
12+
13+
## Deployment
14+
15+
This site is automatically deployed to GitHub Pages when changes are pushed to the main branch.
16+
17+
The site will be available at: `https://stringhandler.github.io/dota-keeper/`
18+
19+
## Local Testing
20+
21+
To test locally, simply open `index.html` in a web browser. For best results, use a local server:
22+
23+
```bash
24+
# Using Python
25+
python -m http.server 8000
26+
27+
# Using Node.js
28+
npx serve
29+
30+
# Using PHP
31+
php -S localhost:8000
32+
```
33+
34+
Then navigate to `http://localhost:8000`
35+
36+
## Updating
37+
38+
- **Screenshot**: Replace `screenshot.png` with an actual app screenshot
39+
- **Version**: The version is automatically fetched from the latest GitHub release
40+
- **Download links**: Automatically updated from GitHub API
41+
42+
## Notes
43+
44+
- The page uses vanilla HTML/CSS/JS with no build step required
45+
- Release information is fetched dynamically from the GitHub API
46+
- Fallback URLs are hardcoded in the HTML if the API fetch fails

docs/index.html

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<meta name="description" content="Dota Keeper - Track your Dota 2 matches and achieve your personal performance goals">
7+
<title>Dota Keeper - Your Personal Dota 2 Performance Tracker</title>
8+
<link rel="stylesheet" href="style.css">
9+
</head>
10+
<body>
11+
<!-- Hero Section -->
12+
<section class="hero">
13+
<div class="container">
14+
<h1 class="hero-title">Dota Keeper</h1>
15+
<p class="hero-tagline">Your Personal Dota 2 Performance Tracker</p>
16+
<p class="hero-description">
17+
Track your matches, set goals, and improve your gameplay with data-driven insights
18+
</p>
19+
<div class="hero-screenshot">
20+
<img src="screenshot.png" alt="Dota Keeper App Screenshot" class="screenshot-img">
21+
</div>
22+
</div>
23+
</section>
24+
25+
<!-- Download Section -->
26+
<section class="download">
27+
<div class="container">
28+
<h2>Download</h2>
29+
<div class="download-grid">
30+
<div class="download-card">
31+
<div class="platform-icon"></div>
32+
<h3>Windows</h3>
33+
<a href="https://github.com/stringhandler/dota-keeper/releases/latest/download/dota-keeper_0.0.0_x64_en-US.msi.zip"
34+
id="dl-windows"
35+
class="btn-download">
36+
Download .msi
37+
</a>
38+
</div>
39+
<div class="download-card">
40+
<div class="platform-icon"></div>
41+
<h3>macOS</h3>
42+
<a href="https://github.com/stringhandler/dota-keeper/releases/latest/download/dota-keeper_aarch64.app.tar.gz"
43+
id="dl-macos-arm"
44+
class="btn-download">
45+
Apple Silicon
46+
</a>
47+
<a href="https://github.com/stringhandler/dota-keeper/releases/latest/download/dota-keeper_x64.app.tar.gz"
48+
id="dl-macos-x64"
49+
class="btn-download">
50+
Intel
51+
</a>
52+
</div>
53+
<div class="download-card">
54+
<div class="platform-icon">🐧</div>
55+
<h3>Linux</h3>
56+
<a href="https://github.com/stringhandler/dota-keeper/releases/latest/download/dota-keeper_0.0.0_amd64.AppImage.tar.gz"
57+
id="dl-linux"
58+
class="btn-download">
59+
Download AppImage
60+
</a>
61+
</div>
62+
</div>
63+
<p class="version-info">
64+
<span class="version">v0.1.7</span> • Free & Open Source
65+
</p>
66+
</div>
67+
</section>
68+
69+
<!-- Features Section -->
70+
<section class="features">
71+
<div class="container">
72+
<h2>Features</h2>
73+
<div class="features-grid">
74+
<div class="feature-card">
75+
<h3>📊 Automatic Match Tracking</h3>
76+
<p>Track match history automatically via OpenDota. No manual entry required.</p>
77+
</div>
78+
<div class="feature-card">
79+
<h3>🎯 Personal Performance Goals</h3>
80+
<p>Set custom goals for CS, KDA, GPM, and more. Track what matters to you.</p>
81+
</div>
82+
<div class="feature-card">
83+
<h3>📈 Goal Progress Analysis</h3>
84+
<p>Analyze goal progress with distribution charts and detailed statistics.</p>
85+
</div>
86+
<div class="feature-card">
87+
<h3>💡 Weekly Suggestions</h3>
88+
<p>Get weekly goal suggestions tailored to your playstyle and performance.</p>
89+
</div>
90+
<div class="feature-card">
91+
<h3>🔒 Privacy First</h3>
92+
<p>Free, open source, runs locally — your data stays on your machine.</p>
93+
</div>
94+
<div class="feature-card">
95+
<h3>🎮 Dota 2 Themed</h3>
96+
<p>Beautiful interface inspired by the game you love.</p>
97+
</div>
98+
</div>
99+
</div>
100+
</section>
101+
102+
<!-- Footer -->
103+
<footer class="footer">
104+
<div class="container">
105+
<p>
106+
<span class="version">v0.1.7</span>
107+
<a href="https://github.com/stringhandler/dota-keeper" target="_blank" rel="noopener">View on GitHub</a>
108+
<a href="https://github.com/stringhandler/dota-keeper/blob/main/LICENSE" target="_blank" rel="noopener">MIT License</a>
109+
</p>
110+
<p class="footer-note">
111+
Dota 2 is a registered trademark of Valve Corporation.
112+
This project is not affiliated with or endorsed by Valve Corporation.
113+
</p>
114+
</div>
115+
</footer>
116+
117+
<script src="script.js"></script>
118+
</body>
119+
</html>

docs/screenshot.png

Lines changed: 1 addition & 0 deletions
Loading

docs/script.js

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
// Fetch the latest release information from GitHub API
2+
async function loadLatestRelease() {
3+
try {
4+
const res = await fetch(
5+
'https://api.github.com/repos/stringhandler/dota-keeper/releases/latest'
6+
);
7+
8+
if (!res.ok) {
9+
console.warn('Failed to fetch latest release, using fallback');
10+
return;
11+
}
12+
13+
const data = await res.json();
14+
15+
// Update version numbers
16+
document.querySelectorAll('.version').forEach(el => {
17+
el.textContent = data.tag_name;
18+
});
19+
20+
// Update download links with actual asset URLs
21+
data.assets.forEach(asset => {
22+
const name = asset.name.toLowerCase();
23+
24+
// Windows .msi.zip
25+
if (name.endsWith('.msi.zip')) {
26+
const windowsBtn = document.querySelector('#dl-windows');
27+
if (windowsBtn) {
28+
windowsBtn.href = asset.browser_download_url;
29+
}
30+
}
31+
// Linux AppImage
32+
else if (name.endsWith('.appimage.tar.gz')) {
33+
const linuxBtn = document.querySelector('#dl-linux');
34+
if (linuxBtn) {
35+
linuxBtn.href = asset.browser_download_url;
36+
}
37+
}
38+
// macOS Apple Silicon (aarch64)
39+
else if (name.includes('aarch64') && name.endsWith('.app.tar.gz')) {
40+
const macosArmBtn = document.querySelector('#dl-macos-arm');
41+
if (macosArmBtn) {
42+
macosArmBtn.href = asset.browser_download_url;
43+
}
44+
}
45+
// macOS Intel (x64)
46+
else if (name.includes('x64') && name.endsWith('.app.tar.gz')) {
47+
const macosX64Btn = document.querySelector('#dl-macos-x64');
48+
if (macosX64Btn) {
49+
macosX64Btn.href = asset.browser_download_url;
50+
}
51+
}
52+
});
53+
54+
console.log(`Successfully loaded release ${data.tag_name} with ${data.assets.length} assets`);
55+
} catch (error) {
56+
console.error('Error fetching release information:', error);
57+
// Fallback URLs are already in the HTML
58+
}
59+
}
60+
61+
// Load release information when page loads
62+
document.addEventListener('DOMContentLoaded', loadLatestRelease);

0 commit comments

Comments
 (0)