Skip to content

Commit 1a062b2

Browse files
Merge pull request #192 from The-Infinitys/dev/The-Infinitys
Dev/the infinitys
2 parents c0b8d74 + a6c2b39 commit 1a062b2

File tree

5 files changed

+81
-1296
lines changed

5 files changed

+81
-1296
lines changed

.github/workflows/nextjs.yml

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
name: Deploy Next.js site to Pages
66

77
on:
8-
# Runs on pushes targeting the default branch
8+
# Runs on pushes targeting the default branch, and dev branches
99
push:
10-
branches: ["main"]
10+
branches: ["main", "dev/**"] # dev/* のブランチにも反応するように変更
1111

1212
# Allows you to run this workflow manually from the Actions tab
1313
workflow_dispatch:
@@ -25,7 +25,7 @@ concurrency:
2525
cancel-in-progress: false
2626

2727
jobs:
28-
# Build job
28+
# Build/Lint job
2929
build:
3030
runs-on: ubuntu-latest
3131
steps:
@@ -39,20 +39,23 @@ jobs:
3939
echo "manager=bun" >> $GITHUB_OUTPUT
4040
echo "command=install" >> $GITHUB_OUTPUT
4141
echo "runner=bun" >> $GITHUB_OUTPUT
42-
42+
4343
- name: Setup Bun
4444
# Bunをインストールするための専用アクション
4545
uses: oven-sh/setup-bun@v1
4646
with:
4747
bun-version: latest # または '1.1.0' のような特定のバージョンを指定
4848

49+
# mainブランチでのみPagesの設定とNext.jsの設定を適用
4950
- name: Setup Pages
51+
if: github.ref == 'refs/heads/main'
5052
uses: actions/configure-pages@v5
5153
with:
5254
# Automatically inject basePath in your Next.js configuration file and disable
5355
# server side image optimization.
5456
static_site_generator: next
5557

58+
# キャッシュの復元(main/devのいずれでも依存関係のインストール前に実行)
5659
- name: Restore cache
5760
uses: actions/cache@v4
5861
with:
@@ -67,18 +70,32 @@ jobs:
6770
- name: Install dependencies
6871
# 'bun install' を実行
6972
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
70-
71-
- name: Build with Next.js
73+
74+
# === 処理分岐 ===
75+
76+
- name: Run lint for dev branches
77+
# ブランチ名が 'dev/' で始まる場合にのみ実行
78+
if: startsWith(github.ref, 'refs/heads/dev/')
79+
# lintコマンドを実行
80+
run: ${{ steps.detect-package-manager.outputs.runner }} run lint
81+
82+
- name: Build with Next.js (for main branch)
83+
# mainブランチの場合にのみ実行
84+
if: github.ref == 'refs/heads/main'
7285
# 'bun next build' を実行
7386
run: ${{ steps.detect-package-manager.outputs.runner }} next build
74-
75-
- name: Upload artifact
87+
88+
- name: Upload artifact (for main branch)
89+
# mainブランチの場合にのみ実行
90+
if: github.ref == 'refs/heads/main'
7691
uses: actions/upload-pages-artifact@v3
7792
with:
7893
path: ./out
7994

8095
# Deployment job
8196
deploy:
97+
# mainブランチの場合にのみ実行
98+
if: github.ref == 'refs/heads/main'
8299
environment:
83100
name: github-pages
84101
url: ${{ steps.deployment.outputs.page_url }}
@@ -87,4 +104,4 @@ jobs:
87104
steps:
88105
- name: Deploy to GitHub Pages
89106
id: deployment
90-
uses: actions/deploy-pages@v4
107+
uses: actions/deploy-pages@v4

biome.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3+
"formatter": {
4+
"enabled": true,
5+
"formatWithErrors": false,
6+
"indentStyle": "space",
7+
"indentWidth": 2,
8+
"lineEnding": "lf",
9+
"lineWidth": 100,
10+
"attributePosition": "auto"
11+
},
12+
"organizeImports": {
13+
"enabled": true
14+
},
15+
"linter": {
16+
"enabled": true,
17+
"rules": {
18+
"recommended": true
19+
}
20+
},
21+
"javascript": {
22+
"formatter": {
23+
"quoteStyle": "single",
24+
"jsxQuoteStyle": "double",
25+
"quoteProperties": "asNeeded",
26+
"trailingCommas": "es5",
27+
"semicolons": "always",
28+
"arrowParentheses": "asNeeded",
29+
"bracketSpacing": true,
30+
"bracketSameLine": false
31+
}
32+
},
33+
"files": {
34+
"ignore": [
35+
"node_modules",
36+
".next",
37+
".git",
38+
"dist",
39+
"build",
40+
"out",
41+
"coverage",
42+
"*.log",
43+
".env*",
44+
".DS_Store",
45+
".vscode",
46+
"*.md",
47+
"eslint.config.js"
48+
]
49+
}
50+
}

0 commit comments

Comments
 (0)