-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
39f47dc
commit f504357
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# 任意のワークフローの名前を定義 | ||
name: nextjs-ci | ||
|
||
#どのGitHubイベントに対して実行されるかを定義 | ||
on: | ||
# メインブランチにpushがあったときにワークフローを実行 | ||
push: | ||
branches: [ main ] | ||
# メインブランチに対するプルリクエストが作成されたときにワークフローを実行 | ||
pull_request: | ||
branches: [ main ] | ||
|
||
# このワークフローで実行されるジョブを定義 | ||
jobs: | ||
# ジョブの名前を定義 | ||
nextjs-ci: | ||
|
||
# このジョブを実行する環境(GitHub Actionsランナー)を指定 | ||
# 今回はubuntuを指定 | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
# 使用するNode.jsのバージョンを定義 | ||
node-version: [18.14.1] | ||
|
||
# 自動化したい作業を定義 | ||
steps: | ||
# 実行環境にソースコードを取り込む | ||
- uses: actions/checkout@v3 | ||
# 実行環境に対してNode.jsのセットアップをする | ||
# 作業に任意の名前を定義 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
# Node.jsのセットアップに必要な設定 | ||
uses: actions/setup-node@v3 | ||
with: | ||
# Node.jsのバージョンを指定 | ||
node-version: ${{ matrix.node-version }} | ||
# yarnのキャッシュを使用する設定 | ||
cache: 'yarn' | ||
# 作業に任意の名前を定義 | ||
- name: Install dependencies | ||
# プロジェクトの依存関係をインストール | ||
run: npm install | ||
# 作業に任意の名前を定義 | ||
- name: Format code | ||
# Prettierでフォーマット | ||
run: npm prettier | ||
# 作業に任意の名前を定義 | ||
- name: Lint code | ||
# ESLintで静的解析の実行 | ||
run: npm lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters