Skip to content

Commit b60e278

Browse files
authored
Merge pull request #138 from DavidKRK/gh-pages
Changement
2 parents 825a0cb + 2b66a7a commit b60e278

13 files changed

Lines changed: 1043 additions & 3357 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: automation
6+
assignees: DavidKRK, Claude, Codex
7+
8+
---
9+
10+
[![Weekly Backup & Archive](https://github.com/DavidKRK/DavidKRK.github.io/actions/workflows/backup.yml/badge.svg)](https://github.com/DavidKRK/DavidKRK.github.io/actions/workflows/backup.yml)

.github/workflows/backup.yml

Lines changed: 12 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: Weekly Backup & Archive
22

33
on:
44
schedule:
5-
# Sauvegarde automatique chaque dimanche à 00:00 (UTC)
65
- cron: '0 0 * * 0'
76
workflow_dispatch:
87

@@ -13,67 +12,42 @@ jobs:
1312
create-backup:
1413
name: Create Weekly Backup
1514
runs-on: ubuntu-latest
15+
1616
steps:
1717
- name: Checkout gh-pages
1818
uses: actions/checkout@v4
1919
with:
2020
ref: gh-pages
2121
fetch-depth: 0
2222

23-
- name: Create backup branch if not exists
24-
run: |
25-
git fetch origin backups || git branch backups
26-
git checkout -B backups
27-
git push -f origin backups
28-
2923
- name: Generate backup
3024
run: |
3125
DATE=$(date +%Y-%m-%d_%H-%M-%S)
3226
BACKUP_DIR="backup-$DATE"
3327
mkdir -p "$BACKUP_DIR"
34-
35-
# Copy all files except .git and backups
28+
29+
# Copie du site en excluant .git et anciens backups
3630
rsync -av --exclude='.git' --exclude='backup-*' ./ "$BACKUP_DIR/"
37-
38-
# Create archive
31+
32+
# Archive compressée
3933
tar -czf "$BACKUP_DIR.tar.gz" "$BACKUP_DIR"
40-
34+
4135
echo "Backup created: $BACKUP_DIR.tar.gz"
4236
ls -lh "$BACKUP_DIR.tar.gz"
4337
44-
- name: Commit backup to backups branch
45-
run: |
46-
git config --local user.email "github-actions[bot]@users.noreply.github.com"
47-
git config --local user.name "github-actions[bot]"
48-
49-
DATE=$(date +%Y-%m-%d_%H-%M-%S)
50-
51-
# Keep only the archive, not the folder
52-
rm -rf backup-*/
53-
54-
git add *.tar.gz
55-
git commit -m "backup: weekly archive $DATE" || echo "No changes to commit"
56-
git push origin backups
57-
58-
- name: Cleanup old backups (keep last 8 weeks)
59-
run: |
60-
# Keep only the 8 most recent backup files
61-
ls -t backup-*.tar.gz | tail -n +9 | xargs -r rm
62-
git add -A
63-
git commit -m "chore: cleanup old backups" || echo "No old backups to remove"
64-
git push origin backups || true
38+
# ⚠️ Plus de commit/push des .tar.gz dans 'backups'
6539

6640
- name: Create GitHub Release with backup
6741
uses: softprops/action-gh-release@v1
6842
with:
6943
tag_name: backup-${{ github.run_number }}
70-
name: Weekly Backup - $(date +%Y-%m-%d)
44+
name: Weekly Backup - ${{ github.run_number }}
7145
body: |
72-
🗄️ **Automatic Weekly Backup**
73-
74-
Created: $(date)
46+
🗄️ Automatic Weekly Backup
47+
48+
Created: ${{ github.run_id }}
7549
Trigger: Scheduled (every Sunday)
76-
50+
7751
This backup contains a complete snapshot of the website.
7852
files: backup-*.tar.gz
7953
draft: false

.github/workflows/codeql.yml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL Advanced"
13+
14+
on:
15+
push:
16+
branches: [ "gh-pages" ]
17+
pull_request:
18+
branches: [ "gh-pages" ]
19+
schedule:
20+
- cron: '44 17 * * 1'
21+
22+
jobs:
23+
analyze:
24+
name: Analyze (${{ matrix.language }})
25+
# Runner size impacts CodeQL analysis time. To learn more, please see:
26+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
27+
# - https://gh.io/supported-runners-and-hardware-resources
28+
# - https://gh.io/using-larger-runners (GitHub.com only)
29+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
30+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
31+
permissions:
32+
# required for all workflows
33+
security-events: write
34+
35+
# required to fetch internal or private CodeQL packs
36+
packages: read
37+
38+
# only required for workflows in private repositories
39+
actions: read
40+
contents: read
41+
42+
strategy:
43+
fail-fast: false
44+
matrix:
45+
include:
46+
- language: actions
47+
build-mode: none
48+
- language: javascript-typescript
49+
build-mode: none
50+
- language: ruby
51+
build-mode: none
52+
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
53+
# Use `c-cpp` to analyze code written in C, C++ or both
54+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
55+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
56+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
57+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
58+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
59+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
60+
steps:
61+
- name: Checkout repository
62+
uses: actions/checkout@v4
63+
64+
# Add any setup steps before running the `github/codeql-action/init` action.
65+
# This includes steps like installing compilers or runtimes (`actions/setup-node`
66+
# or others). This is typically only required for manual builds.
67+
# - name: Setup runtime (example)
68+
# uses: actions/setup-example@v1
69+
70+
# Initializes the CodeQL tools for scanning.
71+
- name: Initialize CodeQL
72+
uses: github/codeql-action/init@v4
73+
with:
74+
languages: ${{ matrix.language }}
75+
build-mode: ${{ matrix.build-mode }}
76+
# If you wish to specify custom queries, you can do so here or in a config file.
77+
# By default, queries listed here will override any specified in a config file.
78+
# Prefix the list here with "+" to use these queries and those in the config file.
79+
80+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
81+
# queries: security-extended,security-and-quality
82+
83+
# If the analyze step fails for one of the languages you are analyzing with
84+
# "We were unable to automatically build your code", modify the matrix above
85+
# to set the build mode to "manual" for that language. Then modify this step
86+
# to build your code.
87+
# ℹ️ Command-line programs to run using the OS shell.
88+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
89+
- name: Run manual build steps
90+
if: matrix.build-mode == 'manual'
91+
shell: bash
92+
run: |
93+
echo 'If you are using a "manual" build mode for one or more of the' \
94+
'languages you are analyzing, replace this with the commands to build' \
95+
'your code, for example:'
96+
echo ' make bootstrap'
97+
echo ' make release'
98+
exit 1
99+
100+
- name: Perform CodeQL Analysis
101+
uses: github/codeql-action/analyze@v4
102+
with:
103+
category: "/language:${{matrix.language}}"

.github/workflows/social-media-post.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: social-media-post
22

3+
permissions:
4+
contents: read
5+
36
on:
47
# Pour l’instant: uniquement déclenché à la main depuis l’onglet Actions
58
workflow_dispatch:

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ GEM
7777
sass-embedded (~> 1.75)
7878
jekyll-watch (2.2.1)
7979
listen (~> 3.0)
80-
json (2.15.1)
80+
json (2.15.2.1)
8181
kramdown (2.5.1)
8282
rexml (>= 3.3.9)
8383
kramdown-parser-gfm (1.1.0)

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ git push origin gh-pages
9393

9494
All rights reserved © 2026 David KRK
9595

96+
" MAY THE TECHNO BE WITH YOU "
97+
David KRK
98+
9699
---
97100

98101
**© 2026 David KRK** | Spinning since September 1999 🎧

0 commit comments

Comments
 (0)