Skip to content

Commit 890a877

Browse files
DavidKRKCopilot
andauthored
feat: restore YouTube auto-sync workflow (#251)
* fix: harden youtube section workflow script execution * chore(lighthouse): downgrade flaky audits to warnings * fix: stabilize CI workflow configuration * Replace external support button image * Cleanup PR scope by reverting unrelated workflow changes * Fix Gemini PR review trusted workspace failure * Improve footer accessibility semantics and focus states * feat: restore YouTube auto-sync workflow (youtube-sync.yml) --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
1 parent 771161a commit 890a877

9 files changed

Lines changed: 208 additions & 54 deletions

File tree

.github/workflows/gemini-pr-review.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ jobs:
156156
id: 'gemini_pr_review'
157157
env:
158158
GITHUB_TOKEN: '${{ steps.generate_token.outputs.token || secrets.GITHUB_TOKEN }}'
159+
GEMINI_CLI_TRUST_WORKSPACE: 'true'
159160
PR_NUMBER: '${{ steps.get_pr.outputs.pr_number || steps.get_pr_comment.outputs.pr_number }}'
160161
PR_DATA: '${{ steps.get_pr.outputs.pr_data || steps.get_pr_comment.outputs.pr_data }}'
161162
CHANGED_FILES: '${{ steps.get_pr.outputs.changed_files || steps.get_pr_comment.outputs.changed_files }}'

.github/workflows/youtube-sync.yml

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
name: YouTube Auto-Sync
2+
3+
on:
4+
schedule:
5+
# Verifie les nouvelles videos tous les jours a 10h UTC (12h CEST)
6+
- cron: '0 10 * * *'
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
youtube-sync:
14+
name: Sync dernieres videos YouTube
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
20+
with:
21+
ref: gh-pages
22+
23+
- name: Setup Python
24+
uses: actions/setup-python@v6
25+
with:
26+
python-version: '3.11'
27+
28+
- name: Installer les dependances
29+
run: pip install requests
30+
31+
- name: Creer le dossier data si necessaire
32+
run: mkdir -p assets/data
33+
34+
- name: Recuperer les dernieres videos YouTube
35+
env:
36+
YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }}
37+
shell: bash
38+
run: |
39+
python <<'PY'
40+
import requests
41+
import json
42+
import os
43+
44+
api_key = os.environ.get('YOUTUBE_API_KEY', '')
45+
if not api_key:
46+
print('YOUTUBE_API_KEY non configure - abandon')
47+
exit(0)
48+
49+
channel_handle = 'DavidKRKofficial'
50+
51+
search_url = (
52+
'https://www.googleapis.com/youtube/v3/search'
53+
'?key=' + api_key
54+
+ '&q=' + channel_handle
55+
+ '&type=channel&part=snippet&maxResults=1'
56+
)
57+
r = requests.get(search_url, timeout=30)
58+
data = r.json()
59+
60+
if 'items' not in data or len(data['items']) == 0:
61+
print('Erreur: chaine YouTube introuvable')
62+
print(data)
63+
exit(1)
64+
65+
channel_id = data['items'][0]['snippet']['channelId']
66+
print('Channel ID trouve: ' + channel_id)
67+
68+
videos_url = (
69+
'https://www.googleapis.com/youtube/v3/search'
70+
'?key=' + api_key
71+
+ '&channelId=' + channel_id
72+
+ '&part=snippet,id&order=date&maxResults=6&type=video'
73+
)
74+
r2 = requests.get(videos_url, timeout=30)
75+
videos = r2.json()
76+
77+
if 'items' not in videos:
78+
print('Erreur: impossible de recuperer les videos')
79+
print(videos)
80+
exit(1)
81+
82+
video_list = []
83+
for item in videos['items']:
84+
video_id = item['id']['videoId']
85+
title = item['snippet']['title']
86+
thumb = item['snippet']['thumbnails']['high']['url']
87+
published = item['snippet']['publishedAt'][:10]
88+
video_list.append({
89+
'id': video_id,
90+
'title': title,
91+
'thumbnail': thumb,
92+
'published': published,
93+
'url': 'https://www.youtube.com/watch?v=' + video_id
94+
})
95+
96+
with open('assets/data/youtube-videos.json', 'w', encoding='utf-8') as f:
97+
json.dump(video_list, f, ensure_ascii=False, indent=2)
98+
99+
print(str(len(video_list)) + ' videos sauvegardees dans assets/data/youtube-videos.json')
100+
for v in video_list:
101+
print(' - [' + v['published'] + '] ' + v['title'])
102+
PY
103+
104+
- name: Commit et push si nouvelles videos
105+
run: |
106+
git config user.name "github-actions[bot]"
107+
git config user.email "github-actions[bot]@users.noreply.github.com"
108+
git add assets/data/youtube-videos.json
109+
if git diff --staged --quiet; then
110+
echo "Aucune nouvelle video detectee."
111+
else
112+
git commit -m "Auto-sync: mise a jour des videos YouTube $(date +%Y-%m-%d)"
113+
git push
114+
echo "Videos mises a jour et poussees !"
115+
fi

assets/css/style.css

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,11 +394,49 @@ footer {
394394
font-size: 2.5rem; /* mobile */
395395
}
396396

397+
.social-icon:focus-visible,
398+
.footer-contact-link:focus-visible {
399+
outline: 2px solid #fff0a8;
400+
outline-offset: 4px;
401+
border-radius: 0.5rem;
402+
}
403+
397404
.social-icon img {
398405
height: 1em;
399406
width: auto;
400407
vertical-align: middle;
401408
}
409+
410+
.social-icon.support-link {
411+
display: inline-flex;
412+
align-items: center;
413+
gap: 0.5rem;
414+
padding: 0.45rem 0.9rem;
415+
border-radius: 9999px;
416+
border: 1px solid rgba(255, 221, 87, 0.45);
417+
background: rgba(255, 221, 87, 0.16);
418+
color: #ffdd57;
419+
font-size: 1rem;
420+
line-height: 1;
421+
text-decoration: none;
422+
}
423+
424+
.social-icon.support-link i {
425+
color: currentColor;
426+
font-size: 1.1em;
427+
}
428+
429+
.social-icon.support-link span {
430+
font-size: 0.9rem;
431+
font-weight: 700;
432+
letter-spacing: 0.03em;
433+
}
434+
435+
.social-icon.support-link:hover,
436+
.social-icon.support-link:focus-visible {
437+
background: rgba(255, 221, 87, 0.24);
438+
color: #fff0a8;
439+
}
402440
@media (min-width: 768px) {
403441
.social-icon {
404442
font-size: 3.5rem; /* desktop */

bio.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -204,21 +204,21 @@ <h1 class="main-title">David KRK</h1>
204204
</iframe>
205205
</div>
206206

207-
<div class="flex justify-center gap-6 mb-4">
207+
<nav class="flex justify-center gap-6 mb-4" aria-label="Liens vers les réseaux sociaux">
208208
<a href="https://www.facebook.com/DavidKRKofficial" target="_blank" rel="noopener noreferrer" aria-label="Facebook"
209-
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-facebook"></i></a>
209+
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-facebook" aria-hidden="true"></i></a>
210210
<a href="https://www.instagram.com/davidkrk/" target="_blank" rel="noopener noreferrer" aria-label="Instagram"
211-
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-instagram"></i></a>
211+
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-instagram" aria-hidden="true"></i></a>
212212
<a href="https://www.mixcloud.com/DavidKRK/" target="_blank" rel="noopener noreferrer" aria-label="Mixcloud"
213-
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-mixcloud"></i></a>
213+
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-mixcloud" aria-hidden="true"></i></a>
214214
<a href="https://www.youtube.com/@DavidKRKofficial" target="_blank" rel="noopener noreferrer" aria-label="YouTube"
215-
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-youtube"></i></a>
215+
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-youtube" aria-hidden="true"></i></a>
216216
<a href="https://soundcloud.com/david-krkofficial/" target="_blank" rel="noopener noreferrer" aria-label="SoundCloud"
217-
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-soundcloud"></i></a>
217+
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-soundcloud" aria-hidden="true"></i></a>
218218
<a href="https://www.tiktok.com/@davidkrk" target="_blank" rel="noopener noreferrer" aria-label="TikTok"
219-
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-tiktok"></i></a>
220-
<a href="https://www.buymeacoffee.com/davidkrk" target="_blank" rel="noopener noreferrer" aria-label="Buy Me A Coffee" class="social-icon text-2xl md:text-3xl"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" width="217" height="60"></a>
221-
</div>
219+
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-tiktok" aria-hidden="true"></i></a>
220+
<a href="https://www.buymeacoffee.com/davidkrk" target="_blank" rel="noopener noreferrer" aria-label="Buy Me A Coffee" class="social-icon support-link"><i class="fa-solid fa-mug-hot" aria-hidden="true"></i><span>Buy Me A Coffee</span></a>
221+
</nav>
222222

223223
<div class="flex flex-wrap justify-center items-center gap-3 sm:gap-4 mb-4 text-sm">
224224
<a href="mailto:davidkrkofficial@gmail.com?subject=Contact%20from%20Website"

contact.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -151,21 +151,21 @@ <h1 class="main-title">David KRK</h1>
151151
</main>
152152

153153
<footer>
154-
<div class="flex justify-center gap-6 mb-4">
154+
<nav class="flex justify-center gap-6 mb-4" aria-label="Liens vers les réseaux sociaux">
155155
<a href="https://www.facebook.com/DavidKRKofficial" target="_blank" rel="noopener noreferrer" aria-label="Facebook"
156-
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-facebook"></i></a>
156+
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-facebook" aria-hidden="true"></i></a>
157157
<a href="https://www.instagram.com/davidkrk/" target="_blank" rel="noopener noreferrer" aria-label="Instagram"
158-
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-instagram"></i></a>
158+
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-instagram" aria-hidden="true"></i></a>
159159
<a href="https://www.mixcloud.com/DavidKRK/" target="_blank" rel="noopener noreferrer" aria-label="Mixcloud"
160-
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-mixcloud"></i></a>
160+
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-mixcloud" aria-hidden="true"></i></a>
161161
<a href="https://www.youtube.com/@DavidKRKofficial" target="_blank" rel="noopener noreferrer" aria-label="YouTube"
162-
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-youtube"></i></a>
162+
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-youtube" aria-hidden="true"></i></a>
163163
<a href="https://soundcloud.com/david-krkofficial/" target="_blank" rel="noopener noreferrer" aria-label="SoundCloud"
164-
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-soundcloud"></i></a>
164+
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-soundcloud" aria-hidden="true"></i></a>
165165
<a href="https://www.tiktok.com/@davidkrk" target="_blank" rel="noopener noreferrer" aria-label="TikTok"
166-
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-tiktok"></i></a>
167-
<a href="https://www.buymeacoffee.com/davidkrk" target="_blank" rel="noopener noreferrer" aria-label="Buy Me A Coffee" class="social-icon text-2xl md:text-3xl"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" width="217" height="60"></a>
168-
</div>
166+
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-tiktok" aria-hidden="true"></i></a>
167+
<a href="https://www.buymeacoffee.com/davidkrk" target="_blank" rel="noopener noreferrer" aria-label="Buy Me A Coffee" class="social-icon support-link"><i class="fa-solid fa-mug-hot" aria-hidden="true"></i><span>Buy Me A Coffee</span></a>
168+
</nav>
169169

170170
<div class="flex flex-wrap justify-center items-center gap-3 sm:gap-4 mb-4 text-sm">
171171
<a href="mailto:davidkrkofficial@gmail.com?subject=Contact%20from%20Website"

event.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,21 +86,21 @@ <h1 class="main-title">David KRK</h1>
8686
allow="autoplay; encrypted-media; fullscreen; idle-detection; speaker-selection; web-share"></iframe>
8787
</div>
8888

89-
<div class="flex justify-center gap-6 mb-4">
89+
<nav class="flex justify-center gap-6 mb-4" aria-label="Liens vers les réseaux sociaux">
9090
<a href="https://www.facebook.com/DavidKRKofficial" target="_blank" rel="noopener noreferrer" aria-label="Facebook"
91-
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-facebook"></i></a>
91+
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-facebook" aria-hidden="true"></i></a>
9292
<a href="https://www.instagram.com/davidkrk/" target="_blank" rel="noopener noreferrer" aria-label="Instagram"
93-
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-instagram"></i></a>
93+
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-instagram" aria-hidden="true"></i></a>
9494
<a href="https://www.mixcloud.com/DavidKRK/" target="_blank" rel="noopener noreferrer" aria-label="Mixcloud"
95-
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-mixcloud"></i></a>
95+
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-mixcloud" aria-hidden="true"></i></a>
9696
<a href="https://www.youtube.com/@DavidKRKofficial" target="_blank" rel="noopener noreferrer" aria-label="YouTube"
97-
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-youtube"></i></a>
97+
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-youtube" aria-hidden="true"></i></a>
9898
<a href="https://soundcloud.com/david-krkofficial/" target="_blank" rel="noopener noreferrer" aria-label="SoundCloud"
99-
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-soundcloud"></i></a>
99+
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-soundcloud" aria-hidden="true"></i></a>
100100
<a href="https://www.tiktok.com/@davidkrk" target="_blank" rel="noopener noreferrer" aria-label="TikTok"
101-
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-tiktok"></i></a>
102-
<a href="https://www.buymeacoffee.com/davidkrk" target="_blank" rel="noopener noreferrer" aria-label="Buy Me A Coffee" class="social-icon text-2xl md:text-3xl"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" width="217" height="60"></a>
103-
</div>
101+
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-tiktok" aria-hidden="true"></i></a>
102+
<a href="https://www.buymeacoffee.com/davidkrk" target="_blank" rel="noopener noreferrer" aria-label="Buy Me A Coffee" class="social-icon support-link"><i class="fa-solid fa-mug-hot" aria-hidden="true"></i><span>Buy Me A Coffee</span></a>
103+
</nav>
104104

105105
<div class="flex flex-wrap justify-center items-center gap-3 sm:gap-4 mb-4 text-sm">
106106
<a href="mailto:davidkrkofficial@gmail.com?subject=Contact%20from%20Website"

index.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -126,21 +126,21 @@ <h1 class="main-title">David KRK</h1>
126126
</main>
127127

128128
<footer>
129-
<div class="flex justify-center gap-6 mb-4">
129+
<nav class="flex justify-center gap-6 mb-4" aria-label="Liens vers les réseaux sociaux">
130130
<a href="https://www.facebook.com/DavidKRKofficial" target="_blank" rel="noopener noreferrer" aria-label="Facebook"
131-
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-facebook"></i></a>
131+
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-facebook" aria-hidden="true"></i></a>
132132
<a href="https://www.instagram.com/davidkrk/" target="_blank" rel="noopener noreferrer" aria-label="Instagram"
133-
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-instagram"></i></a>
133+
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-instagram" aria-hidden="true"></i></a>
134134
<a href="https://www.mixcloud.com/DavidKRK/" target="_blank" rel="noopener noreferrer" aria-label="Mixcloud"
135-
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-mixcloud"></i></a>
135+
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-mixcloud" aria-hidden="true"></i></a>
136136
<a href="https://www.youtube.com/@DavidKRKofficial" target="_blank" rel="noopener noreferrer" aria-label="YouTube"
137-
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-youtube"></i></a>
137+
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-youtube" aria-hidden="true"></i></a>
138138
<a href="https://soundcloud.com/david-krkofficial/" target="_blank" rel="noopener noreferrer" aria-label="SoundCloud"
139-
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-soundcloud"></i></a>
139+
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-soundcloud" aria-hidden="true"></i></a>
140140
<a href="https://www.tiktok.com/@davidkrk" target="_blank" rel="noopener noreferrer" aria-label="TikTok"
141-
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-tiktok"></i></a>
142-
<a href="https://www.buymeacoffee.com/davidkrk" target="_blank" rel="noopener noreferrer" aria-label="Buy Me A Coffee" class="social-icon text-2xl md:text-3xl"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" width="217" height="60"></a>
143-
</div>
141+
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-tiktok" aria-hidden="true"></i></a>
142+
<a href="https://www.buymeacoffee.com/davidkrk" target="_blank" rel="noopener noreferrer" aria-label="Buy Me A Coffee" class="social-icon support-link"><i class="fa-solid fa-mug-hot" aria-hidden="true"></i><span>Buy Me A Coffee</span></a>
143+
</nav>
144144

145145
<div class="flex flex-wrap justify-center items-center gap-3 sm:gap-4 mb-4 text-sm">
146146
<a href="mailto:davidkrkofficial@gmail.com?subject=Contact%20from%20Website"

0 commit comments

Comments
 (0)