Skip to content

Commit ed59f93

Browse files
committed
about page
1 parent 8e5b2e0 commit ed59f93

4 files changed

Lines changed: 43 additions & 1 deletion

File tree

.github/workflows/pages.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,20 @@ jobs:
3333
- name: Setup Pages
3434
uses: actions/configure-pages@v5
3535

36+
- name: Compute build metadata
37+
id: meta
38+
run: |
39+
echo "short_sha=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_OUTPUT
40+
echo "timestamp=$(TZ=Europe/Zurich date '+%Y-%m-%d %H:%M %Z')" >> $GITHUB_OUTPUT
41+
42+
- name: Inject build info into about.html
43+
uses: cschleiden/replace-tokens@v1
44+
with:
45+
files: '["about.html"]'
46+
env:
47+
SHORT_SHA: ${{ steps.meta.outputs.short_sha }}
48+
TIMESTAMP: ${{ steps.meta.outputs.timestamp }}
49+
3650
- name: Upload artifact
3751
uses: actions/upload-pages-artifact@v4
3852
with:

about.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!DOCTYPE html>
2+
<html lang="fr">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta http-equiv="Cache-Control" content="no-cache">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<title>À propos — Morpion</title>
8+
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
9+
</head>
10+
<body class="bg-light">
11+
<div class="container py-4" style="max-width: 480px">
12+
<h1 class="mb-4">À propos</h1>
13+
<dl class="row">
14+
<dt class="col-4">Dépôt</dt>
15+
<dd class="col-8 font-monospace"><a href="https://github.com/#{GITHUB_REPOSITORY}#">#{GITHUB_REPOSITORY}#</a></dd>
16+
<dt class="col-4">Branche</dt>
17+
<dd class="col-8 font-monospace">#{GITHUB_REF_NAME}#</dd>
18+
<dt class="col-4">Commit</dt>
19+
<dd class="col-8 font-monospace"><a href="https://github.com/#{GITHUB_REPOSITORY}#/commit/#{SHORT_SHA}#">#{SHORT_SHA}#</a></dd>
20+
<dt class="col-4">Construit le</dt>
21+
<dd class="col-8 font-monospace">#{TIMESTAMP}#</dd>
22+
</dl>
23+
</div>
24+
</body>
25+
</html>

index.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@
3434
</head>
3535
<body class="bg-light">
3636
<div class="container py-4">
37-
<h1 class="mb-4">Morpion — Analyse Minimax</h1>
37+
<div class="d-flex justify-content-between align-items-center mb-4">
38+
<h1 class="mb-0">Morpion — Analyse Minimax</h1>
39+
<a href="about.html" class="text-muted text-decoration-none fs-4" title="À propos"></a>
40+
</div>
3841

3942
<div class="d-flex gap-5 align-items-start flex-wrap">
4043

screenshot.png

60.9 KB
Loading

0 commit comments

Comments
 (0)