-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install tools to use hugo with Nix to avoid unstable snap #279
Conversation
Walkthroughこの変更は、
Changes
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Status
Configuration used: CodeRabbit UI
Files selected for processing (2)
- .github/workflows/generate_site_and_deploy.yaml (1 hunks)
- flake.nix (1 hunks)
Additional comments not posted (5)
flake.nix (2)
33-33
:edge-pkgs.dprint
の追加は良い改善です。
41-57
:hugo-nix
エントリーの追加は、デプロイメントプロセスの改善に貢献する良い変更です。パフォーマンスの向上が期待されます。.github/workflows/generate_site_and_deploy.yaml (3)
31-34
: キャッシュキーの更新は、Nixベースのビルドプロセスに適応するための適切な変更です。
40-40
: Node.js依存関係をNixを通じてインストールする変更は、依存関係の管理を改善します。
48-48
: HugoをNixを通じて実行する変更は、ビルドプロセスの一貫性と再現性を向上させます。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Status
Configuration used: CodeRabbit UI
Files selected for processing (1)
- .github/workflows/generate_site_and_deploy.yaml (1 hunks)
Additional comments not posted (4)
.github/workflows/generate_site_and_deploy.yaml (4)
31-33
: キャッシュキーの更新を行ってください。これにより、Nixのフレーク機能を利用して依存関係のキャッシュをより効率的に管理できます。
37-37
: DeterminateSystems/nix-installer-action@v10を使用してNixをセットアップしてください。これにより、ビルドプロセス全体がNixによって管理され、依存関係の解決が容易になります。
42-42
: Node.jsの依存関係をインストールするためにnix develop --command npm ci
を使用してください。これにより、Nixの環境内で依存関係が正確に解決され、プロジェクトの再現性が向上します。
50-50
: Hugoをビルドするためにnix run .#hugo-nix -- --panicOnWarning
コマンドを使用してください。これにより、Nixによって管理される環境内でHugoが実行され、ビルドプロセスの一貫性と再現性が保証されます。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
速くなったならよし
Azs! なんか良くなかったら戻しましょう! |
Fixes #276
Nix を使うと Nix 自体のセットアップに掛かるところでオーバーヘッドかかったりもしがちなんですが、今回は snap を使った dart-sass のインストールが遅すぎるということでトータルで見ると10倍近く高速化しました。
なるべく既存コードへ差異がでないように差し込んだのでメンテナンスコストは大幅に上がったりしないんじゃないかなと思うんですけどどうでしょう?
(他には brew を使ってsassいれるとかも有りそう。試しては居ないです)
Before
Total 7.5~12 minutes
After
Total 1.3~1.5 minutes
Summary by CodeRabbit
edge-pkgs.dprint
をパッケージリストに追加しました。hugo-nix
の新しいエントリをapps
セクションに含めるように変更しました。