Skip to content
Merged
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
20 changes: 20 additions & 0 deletions deploy.show.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
service-my-project-integration:
ssh_host: user@remote-host.com
ssh_port: 12345
repo_url: git@github.com:hailangvn/my-project.git
exec_start: python -m my_project.main
hooks:
pre-update:
- echo "Update starting"
pre-update-required:
- echo "Update required"
pre-update-success:
- echo "Pre-checks passed"
pre-update-fail:
- echo "Pre-checks failed"
post-update:
- echo "Post update"
post-update-success:
- echo "Update succeeded"
post-update-fail:
- echo "Update failed"
35 changes: 8 additions & 27 deletions site-docs/docs/demo.tape → site-docs/docs/demo-1.tape
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Showcases: installation, configure/update/status command help

# ── Output ────────────────────────────────────────────────────────────────────
Output ./site-docs/docs/demo.gif
Output ./site-docs/docs/demo-1.gif

# ── Dependencies ──────────────────────────────────────────────────────────────
Require deploy
Expand Down Expand Up @@ -50,41 +50,22 @@ Enter

Sleep 6s

# ── Scene 3: configure --help ─────────────────────────────────────────────────
# ── Scene 3: config file ──────────────────────────────────────────────────────
Hide
Type "clear"
Enter
Show

Sleep 500ms
Type "deploy configure --help"
Sleep 400ms
Type "cp deploy.show.yml deploy.yml"
Enter

Sleep 6s

# ── Scene 4: update --help ────────────────────────────────────────────────────
Hide
Type "clear"
Enter
Show

Sleep 500ms
Type "deploy update --help"
Type "vi deploy.yml"
Sleep 400ms
Enter
Type "zR"

Sleep 6s

# ── Scene 5: status --help ────────────────────────────────────────────────────
Hide
Type "clear"
Enter
Show
Sleep 12s

Sleep 500ms
Type "deploy status --help"
Sleep 400ms
Type ":q"
Sleep 1ms
Enter

Sleep 6s
71 changes: 71 additions & 0 deletions site-docs/docs/demo-2.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# trobz-deploy terminal demo
# Showcases: installation, configure/update/status command help

# ── Output ────────────────────────────────────────────────────────────────────
Output ./site-docs/docs/demo-2.gif

# ── Dependencies ──────────────────────────────────────────────────────────────
Require deploy

# ── Settings ──────────────────────────────────────────────────────────────────
Set Shell bash
Set TypingSpeed 25ms
Set Width 2300
Set Height 1600
Set FontSize 49
Set FontFamily "JetBrains Mono, Fira Code, monospace"
Set Theme { "name": "deploy", "background": "#111111", "foreground": "#f5f5f5", "cursor": "#ea580c", "black": "#2a2a2a", "red": "#ef4444", "green": "#22c55e", "yellow": "#eab308", "blue": "#3b82f6", "magenta": "#d946ef", "cyan": "#06b6d4", "white": "#f5f5f5", "brightBlack": "#52525b", "brightRed": "#f87171", "brightGreen": "#4ade80", "brightYellow": "#facc15", "brightBlue": "#60a5fa", "brightMagenta": "#e879f9", "brightCyan": "#22d3ee", "brightWhite": "#ffffff" }
Set WindowBar Colorful
Set WindowBarSize 60
Set BorderRadius 15
Set Margin 30
Set Padding 40
Set LineHeight 1.3

Hide
Type "export PS1='\[\033[38;2;249;115;22m\]❯\[\033[0m\] '"
Enter
Type "clear"
Enter
Show

# ── Scene 4: configure command ────────────────────────────────────────────────
Hide
Type "cp deploy.demo.yml deploy.yml"
Enter
Type "clear"
Enter
Show

Sleep 500ms
Type "deploy configure service-my-project-integration"
Sleep 400ms
Enter

Sleep 30s

# ── Scene 5: update command ───────────────────────────────────────────────────
Hide
Type "clear"
Enter
Show

Sleep 500ms
Type "deploy update service-my-project-integration"
Sleep 400ms
Enter

Sleep 30s

# ── Scene 6: status command ───────────────────────────────────────────────────
Hide
Type "clear"
Enter
Show

Sleep 500ms
Type "deploy status service-my-project-integration"
Sleep 400ms
Enter

Sleep 12s
Binary file modified site-docs/docs/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions site-docs/docs/javascripts/commit-count.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/**
* Fetches total commit count from the GitHub API and displays it
* in the #commit-count-badge element on the landing page.
*
* Uses the Link header pagination trick: request 1 commit per page,
* read the last page number from the Link header — that IS the count.
*/

; (function () {
const GITHUB_REPO = 'trobz/deploy.py';

function formatCount(n) {
if (n >= 1000) return (n / 1000).toFixed(1).replace(/\.0$/, '') + 'k';
return String(n);
}

async function fetchCommitCount() {
const label = document.getElementById('github-commit-count');
if (!label) return;

try {
const res = await fetch(
`https://api.github.com/repos/${GITHUB_REPO}/commits?per_page=1`,
{ headers: { Accept: 'application/vnd.github+json' } }
);
if (!res.ok) return;

const link = res.headers.get('Link') || '';
const match = link.match(/[?&]page=(\d+)>;\s*rel="last"/);
if (!match) return;

const total = parseInt(match[1], 10);
label.textContent = `${formatCount(total)} commits`;
} catch (_) {
// Silently fail — label stays with placeholder
}
}

if (typeof document$ !== 'undefined') {
document$.subscribe(fetchCommitCount);
} else if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', fetchCommitCount);
} else {
fetchCommitCount();
}
})();
26 changes: 26 additions & 0 deletions site-docs/docs/stylesheets/hero.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,32 @@ body:has(.ov-landing) .md-content__inner {
align-items: flex-start; gap: 1.5rem;
}

.ov-github-badge {
position: fixed;
top: 1.5rem;
right: 1.5rem;
z-index: 100;
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.6rem 1.2rem;
background: var(--ov-surface);
border: 1px solid var(--ov-border);
border-radius: 999px;
color: var(--ov-text) !important;
font-family: var(--ov-font-mono);
font-size: 0.85rem;
text-decoration: none;
backdrop-filter: blur(12px);
transition: all 0.2s ease;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ov-github-badge:hover {
background: var(--ov-border);
transform: translateY(-2px);
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}
.ov-split__demo {
display: flex; align-items: center; justify-content: center;
}
Expand Down
8 changes: 8 additions & 0 deletions site-docs/overrides/landing.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
{# ── Three.js particle canvas (background layer) ── #}
<canvas id="hero-canvas" class="ov-landing__canvas" aria-hidden="true"></canvas>

<a href="https://github.com/trobz/deploy.py" class="ov-github-badge" target="_blank" rel="noopener noreferrer">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
<path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z" />
</svg>
<span id="github-commit-count">69 commits</span>
</a>
<script src="{{ base_url }}/javascripts/commit-count.js"></script>

{# ── Split layout: left = copy, right = demo/screenshot ── #}
<main class="ov-split">

Expand Down