Skip to content

Commit 1414dd2

Browse files
committed
Upgrade dependencies to nextjs v15. Add commit hash to footer
1 parent 47ef101 commit 1414dd2

6 files changed

Lines changed: 2265 additions & 1141 deletions

File tree

.github/workflows/build.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,24 @@ jobs:
1212
concurrency: ci-${{ github.ref }}
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v3
16-
- uses: actions/setup-node@v3
15+
- uses: actions/checkout@v4
16+
17+
- name: Use Node.js
18+
uses: actions/setup-node@v4
1719
with:
18-
node-version: 19
20+
node-version: 20
1921
cache: npm
2022

23+
- name: Install dependencies
24+
run: npm ci
25+
2126
- name: Build
22-
run: |
23-
npm ci
24-
npm run build
25-
touch out/.nojekyll
27+
run: npm run build --if-present
28+
29+
- name: Create .nojekyll
30+
run: touch out/.nojekyll
2631

27-
- name: Deploy
28-
uses: JamesIves/github-pages-deploy-action@v4.4.3
32+
- name: Deploy to GitHub Pages
33+
uses: JamesIves/github-pages-deploy-action@v4.7.2
2934
with:
3035
folder: out

next.config.mjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
1+
import * as childproc from "child_process";
2+
3+
const commitHash = childproc
4+
.execSync('git log --pretty=format:"%h" -n1')
5+
.toString()
6+
.trim();
7+
18
/** @type {import('next').NextConfig} */
29
const nextConfig = {
310
output: "export",
11+
env: {
12+
COMMIT_HASH: commitHash,
13+
},
414
};
515

616
export default nextConfig;

0 commit comments

Comments
 (0)