Skip to content

Commit 23d07e4

Browse files
committed
new website
1 parent 3273d2c commit 23d07e4

31 files changed

+9978
-21
lines changed

.github/workflows/deploy.yml

Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,53 @@
1-
name: Deploy Hugo site to Pages
1+
name: Deploy Next.js site to GitHub Pages
22

33
on:
44
push:
55
branches: [source]
6+
workflow_dispatch:
67

78
permissions:
8-
contents: write
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
916

1017
jobs:
11-
deploy:
18+
build:
1219
runs-on: ubuntu-latest
1320
steps:
14-
- name: Checkout source
21+
- name: Checkout
1522
uses: actions/checkout@v4
16-
with:
17-
submodules: recursive
18-
fetch-depth: 0
1923

20-
- name: Setup Hugo
21-
uses: peaceiris/actions-hugo@v2
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
2226
with:
23-
hugo-version: 'latest'
24-
extended: true
27+
node-version: "20"
28+
cache: "npm"
29+
30+
- name: Setup Pages
31+
uses: actions/configure-pages@v5
32+
33+
- name: Install dependencies
34+
run: npm ci
2535

26-
- name: Build
27-
run: hugo --minify
36+
- name: Build with Next.js
37+
run: npm run build
2838

29-
- name: Deploy to master branch
30-
uses: peaceiris/actions-gh-pages@v3
39+
- name: Upload artifact
40+
uses: actions/upload-pages-artifact@v3
3141
with:
32-
github_token: ${{ secrets.GITHUB_TOKEN }}
33-
publish_dir: ./public
34-
publish_branch: master
35-
user_name: 'Rohan Hasabe'
36-
user_email: 'rohanhasabe8@gmail.com'
37-
commit_message: '[GitHub Actions]: Deploy Hugo site'
42+
path: ./out
43+
44+
deploy:
45+
environment:
46+
name: github-pages
47+
url: ${{ steps.deployment.outputs.page_url }}
48+
runs-on: ubuntu-latest
49+
needs: build
50+
steps:
51+
- name: Deploy to GitHub Pages
52+
id: deployment
53+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,43 @@
1+
# Dependencies
2+
node_modules
3+
.pnp
4+
.pnp.js
15

6+
# Next.js
7+
.next/
8+
out/
9+
build/
10+
11+
# Production
12+
dist/
13+
14+
# Debug
15+
npm-debug.log*
16+
yarn-debug.log*
17+
yarn-error.log*
18+
19+
# Local env files
20+
.env
21+
.env.local
22+
.env.development.local
23+
.env.test.local
24+
.env.production.local
25+
26+
# Vercel
27+
.vercel
28+
29+
# TypeScript
30+
*.tsbuildinfo
31+
next-env.d.ts
32+
33+
# Testing
34+
coverage/
35+
36+
# Misc
237
.DS_Store
38+
*.pem
39+
40+
# Hugo (legacy)
41+
public/
42+
resources/
43+
.hugo_build.lock

eslint.config.mjs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { dirname } from "path";
2+
import { fileURLToPath } from "url";
3+
import { FlatCompat } from "@eslint/eslintrc";
4+
5+
const __filename = fileURLToPath(import.meta.url);
6+
const __dirname = dirname(__filename);
7+
8+
const compat = new FlatCompat({
9+
baseDirectory: __dirname,
10+
});
11+
12+
const eslintConfig = [...compat.extends("next/core-web-vitals")];
13+
14+
export default eslintConfig;

next.config.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import type { NextConfig } from "next";
2+
3+
const nextConfig: NextConfig = {
4+
output: "export",
5+
images: {
6+
unoptimized: true,
7+
},
8+
// No basePath needed for user sites (username.github.io)
9+
};
10+
11+
export default nextConfig;

0 commit comments

Comments
 (0)