Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
paths:
- 'docs/**'
- 'bun.lock'
- 'flake.nix'
- 'flake.lock'

jobs:
build-test:
Expand All @@ -14,13 +16,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v6

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.0.11

- name: Install Dependencies
run: bun install
- name: Install Nix
uses: cachix/install-nix-action@v31

- name: Build Site
run: bash script/build.sh
run: nix run .#build
Comment thread
shunsock marked this conversation as resolved.
Outdated
14 changes: 5 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
branches: ["master"]
paths:
- 'docs/**'
- 'flake.nix'
- 'flake.lock'
Comment thread
shunsock marked this conversation as resolved.

workflow_dispatch:

Expand All @@ -27,16 +29,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v6

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.0.11

- name: Install Dependencies
run: bash script/setup.sh
- name: Install Nix
uses: cachix/install-nix-action@v31

- name: Build Site
run: bash script/build.sh
run: nix run .#build

- name: Setup Pages
uses: actions/configure-pages@v5
Expand All @@ -49,4 +46,3 @@ jobs:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

20 changes: 0 additions & 20 deletions .github/workflows/validate_shellscript.yml

This file was deleted.

9 changes: 4 additions & 5 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
version: '3'

tasks:
run:
desc: 開発用サーバーの起動
cmds:
- bash ./script/dev.sh
Comment thread
shunsock marked this conversation as resolved.
Outdated
build:
desc: プロダクション用にアプリケーション(VitePress)をビルド
cmds:
- bash ./script/build.sh
start:
desc: 開発用サーバーの起動
cmds:
- bash ./script/start.sh

30 changes: 29 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,42 @@
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };

dev-server = pkgs.writeShellApplication {
name = "dev-server";
runtimeInputs = [ pkgs.bun ];
text = ''
bash ${./script/dev.sh}
'';
};
Comment thread
shunsock marked this conversation as resolved.

build-site = pkgs.writeShellApplication {
name = "build-site";
runtimeInputs = [ pkgs.bun ];
text = ''
bash ${./script/build.sh}
'';
};
Comment thread
shunsock marked this conversation as resolved.
in {
apps = {
default = {
type = "app";
program = "${dev-server}/bin/dev-server";
};
build = {
type = "app";
program = "${build-site}/bin/build-site";
};
};

devShell = pkgs.mkShell {
buildInputs = [
pkgs.go-task
pkgs.bun
];
shellHook = ''
bash ./script/setup.sh
echo "bun version: $(bun --version)"
echo "go-task version: $(task --version)"
'';
};
});
Expand Down
1 change: 0 additions & 1 deletion script/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ set -euo pipefail
[ -d "node_modules" ] && rm -rf -- "node_modules"
bun install
bun run docs:build

1 change: 0 additions & 1 deletion script/start.sh → script/dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ set -euo pipefail
[ -d "node_modules" ] && rm -rf -- "node_modules"
bun install
bun run docs:dev

7 changes: 0 additions & 7 deletions script/setup.sh

This file was deleted.

Loading