Execute build task on deployment of new revisions

This commit is contained in:
2026-04-18 15:43:45 +04:00
parent 7f27e1013c
commit d789091d8a

View File

@@ -23,9 +23,21 @@ git node['blossom']['install_dir'] do
action :sync
user node['blossom']['user']
group node['blossom']['group']
notifies :run, 'execute[blossom_build]', :immediately
notifies :restart, 'service[blossom]', :delayed
end
execute 'blossom_build' do
command '/usr/local/bin/deno task build'
cwd node['blossom']['install_dir']
user node['blossom']['user']
group node['blossom']['group']
environment(
'DENO_DIR' => "/home/#{node['blossom']['user']}/.cache/deno"
)
action :nothing
end
directory "/home/#{node['blossom']['user']}/data" do
owner node['blossom']['user']
group node['blossom']['group']