feat: nix run でdev server起動・ビルドを可能にする#143
Merged
Conversation
- flake.nixにapps.default (dev server) とapps.build (build) を追加 - writeShellApplicationでscript/のシェルスクリプトを呼び出す構成 - CIをNix化 (cachix/install-nix-action + nix run .#build) - Taskfileのstartをrunにリネーム - 不要になったsetup.sh, start.sh, validate_shellscript.ymlを削除 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Nix Flake を中心に、開発/ビルドの実行経路を整理し、GitHub Actions でも Nix 経由でビルドするように寄せるPRです。
Changes:
- Taskfile の開発サーバー起動タスクを
startからrunに変更 flake.nixにnix run用の apps(dev / build)を追加し、devShell の hook を簡素化- GitHub Actions を Bun セットアップから Nix 実行(
nix run .#build)へ移行、ShellCheck workflow を削除
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| Taskfile.yml | 開発サーバー起動タスク名/呼び出しスクリプトを更新 |
| script/setup.sh | setup スクリプトを削除 |
| script/dev.sh | 末尾の空行削除のみ |
| script/build.sh | 末尾の空行削除のみ |
| flake.nix | nix run 用 apps 追加、devShell の hook を置き換え |
| .github/workflows/validate_shellscript.yml | ShellCheck workflow を削除 |
| .github/workflows/deploy.yml | Nix を導入し nix run .#build でビルド、paths を更新 |
| .github/workflows/build.yml | Nix を導入し nix run .#build でビルド、paths を更新 |
You can also share your feedback on Copilot code review. Take the survey.
runtimeInputsにbashが含まれていないため、実行環境によっては
bash: command not found になる可能性があった。
${pkgs.bash}/bin/bash を使用してパスを保証する。
Refs: #143
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2 tasks
validate_shellscript.ymlが削除されたことでscript/*.shの 静的解析がなくなっていた。build.ymlにshellcheckジョブを追加し、 script/*.shの変更時にもトリガーされるようpathsを追加。 Refs: #143 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
明示的パス指定ではなくruntimeInputsでbashの存在を保証する アプローチに変更。writeShellApplicationのPATHにbashが含まれる。 Refs: #143 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
flake.nixではbuildがappsとして定義されているため、 packagesを参照するnix buildではなくnix runを使用する必要がある。 また、script/run.shにnix runコマンドを追加。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ShellCheckによるシェルスクリプト検証ワークフローを復元。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
flake.nixにappsを追加し、nix runでdev server起動、nix run .#buildでプロダクションビルドが可能にsetup-bunをcachix/install-nix-action+nix run .#buildに置換script/に分離し、flake.nix / Taskfile / CI はハンドラとしてスクリプトを呼び出す構成Changes
apps.default(dev server) とapps.build(build) を追加。writeShellApplicationでscript/のシェルスクリプトを呼び出すstart→runにリネーム、bash ./script/dev.shを呼び出す形に統一setup-bun→install-nix-action+nix run .#buildstart.shをリネーム)script/setup.sh,script/start.sh,.github/workflows/validate_shellscript.ymlTest plan
nix run→ dev serverが起動し http://localhost:5173/resume/ にアクセス可能nix run .#build→docs/.vitepress/dist/にビルド成果物が生成されるtask run→ dev serverが起動するtask build→ ビルドが成功する🤖 Generated with Claude Code