Skip to content

Commit 25a6015

Browse files
committed
[actions] Setup workflow to publish docs/ to gh-pages
1 parent fc3ab88 commit 25a6015

File tree

3 files changed

+224
-0
lines changed

3 files changed

+224
-0
lines changed

.github/workflows/publish-docs.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publish Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- 4.x-cuda
7+
paths:
8+
- 'docs/**'
9+
workflow_dispatch:
10+
11+
jobs:
12+
deploy:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Update gh-pages Branch
19+
shell: bash
20+
run: |
21+
cp -r docs docs-tmp
22+
git fetch origin gh-pages
23+
git checkout gh-pages
24+
git rm * -f -r --ignore-unmatch
25+
git add docs-tmp/
26+
git mv docs-tmp/* .
27+
git commit -m "[docs] @${{ github.triggering_actor }}: Update Documentation" \
28+
-m "Source: ${{ github.ref_name }} (${{ github.sha }})" \
29+
git push

docs/index.html

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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+
<title>opencv-python-cuda | Download</title>
7+
<link rel="stylesheet" href="styles.css">
8+
<link rel="preconnect" href="https://fonts.googleapis.com">
9+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10+
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans:wght@300;400;500;700&display=swap" rel="stylesheet">
11+
</head>
12+
<body>
13+
<header>
14+
<div class="container">
15+
<h1>opencv-python-cuda</h1>
16+
<p>Pre-built NVIDIA® CUDA™ enabled OpenCV packages for Python.</p>
17+
</div>
18+
</header>
19+
20+
<main>
21+
<div class="container">
22+
<section class="download-section">
23+
<h2>Download</h2>
24+
<p class="version">Latest Release: 4.12.0-dev0</p>
25+
<div class="platform-selection">
26+
<div class="platform">
27+
<h3>Windows</h3>
28+
<a href="https://github.com/Breakthrough/opencv-python-cuda/releases/tag/4.12.0-dev0" class="download-button">x86_64</a>
29+
</div>
30+
<div class="platform">
31+
<h3>Linux</h3>
32+
<a href="#" class="download-button disabled">x86_64 (Coming Soon)</a>
33+
</div>
34+
</div>
35+
<div class="eula">
36+
<p>By downloading and using the software, you agree to fully comply with the terms and conditions of the <a href="https://docs.nvidia.com/cuda/eula/index.html" target="_blank">CUDA EULA</a>.</p>
37+
</div>
38+
</section>
39+
40+
<section class="about-section">
41+
<h2>About opencv-python-cuda</h2>
42+
<p>
43+
This project provides pre-built NVIDIA® CUDA™ enabled OpenCV packages for Python that come with all batteries included.
44+
It is a fork of the official <a href="https://github.com/opencv/opencv-python">opencv-python</a> project.
45+
Currently, packages are only produced for Windows x64, and devices must be Maxwell class (GeForce 900 series) or newer.
46+
</p>
47+
<p>
48+
Once installed via <code>pip</code> (or another Python package manager like <code>uv</code>), the following should just work:
49+
</p>
50+
<pre><code>import cv2
51+
print(cv2.cuda.getCudaEnabledDeviceCount())</code></pre>
52+
</section>
53+
</div>
54+
</main>
55+
56+
<footer>
57+
<div class="container">
58+
<p>&copy; 2025 Breakthrough. All rights reserved. Based on the official <a href="https://github.com/opencv/opencv-python">opencv-python</a> project.</p>
59+
</div>
60+
</footer>
61+
62+
</body>
63+
</html>

docs/style.css

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
body {
2+
font-family: 'Noto Sans', sans-serif;
3+
background-color: #1a1a1a;
4+
color: #ffffff;
5+
margin: 0;
6+
line-height: 1.6;
7+
}
8+
9+
.container {
10+
max-width: 960px;
11+
margin: 0 auto;
12+
padding: 0 20px;
13+
}
14+
15+
header {
16+
background-color: #2c2c2c;
17+
padding: 40px 0;
18+
text-align: center;
19+
}
20+
21+
header h1 {
22+
font-size: 3em;
23+
margin: 0;
24+
font-weight: 700;
25+
}
26+
27+
header p {
28+
font-size: 1.2em;
29+
font-weight: 300;
30+
}
31+
32+
main {
33+
padding: 40px 0;
34+
}
35+
36+
.download-section {
37+
background-color: #2c2c2c;
38+
padding: 40px;
39+
text-align: center;
40+
border-radius: 8px;
41+
}
42+
43+
.download-section h2 {
44+
font-size: 2.5em;
45+
margin-top: 0;
46+
font-weight: 500;
47+
}
48+
49+
.version {
50+
font-size: 1.2em;
51+
margin-bottom: 20px;
52+
font-weight: 300;
53+
}
54+
55+
.download-button {
56+
display: inline-block;
57+
background-color: #76b900;
58+
color: #ffffff;
59+
padding: 15px 30px;
60+
text-decoration: none;
61+
font-size: 1.2em;
62+
font-weight: 500;
63+
border-radius: 4px;
64+
transition: background-color 0.3s ease;
65+
}
66+
67+
.download-button:hover {
68+
background-color: #88d400;
69+
}
70+
71+
.eula {
72+
margin-top: 20px;
73+
font-size: 0.9em;
74+
}
75+
76+
.eula a {
77+
color: #76b900;
78+
}
79+
80+
.about-section {
81+
margin-top: 40px;
82+
}
83+
84+
.about-section h2 {
85+
font-size: 2em;
86+
font-weight: 500;
87+
}
88+
89+
pre {
90+
background-color: #2c2c2c;
91+
padding: 20px;
92+
border-radius: 4px;
93+
white-space: pre-wrap;
94+
word-wrap: break-word;
95+
}
96+
97+
code {
98+
font-family: 'Courier New', Courier, monospace;
99+
}
100+
101+
footer {
102+
background-color: #2c2c2c;
103+
text-align: center;
104+
padding: 20px 0;
105+
margin-top: 40px;
106+
font-size: 0.9em;
107+
}
108+
109+
footer a {
110+
color: #76b900;
111+
text-decoration: none;
112+
}
113+
.platform-selection {
114+
display: flex;
115+
justify-content: space-around;
116+
margin-bottom: 30px;
117+
}
118+
119+
.platform {
120+
text-align: center;
121+
}
122+
123+
.platform h3 {
124+
margin-bottom: 15px;
125+
font-weight: 500;
126+
}
127+
128+
.download-button.disabled {
129+
background-color: #555;
130+
cursor: not-allowed;
131+
pointer-events: none;
132+
}

0 commit comments

Comments
 (0)