update page service key

This commit is contained in:
chenjing 2023-08-18 10:50:42 +08:00
parent bfa5c18304
commit 13768a2f3a
1 changed files with 3 additions and 2 deletions

View File

@ -51,8 +51,9 @@ class PageService
"hugo_build"
end
if script_path.present?
uri = URI.parse("http://gitlink.kingchan.cn/gitlink_execute_script?key=#{Rails.application.config_for(:configuration)['deploy_key']}&script_path=#{script_path}&project_dir=#{project_dir}&repo=#{repo}&repo_link=#{repo_link}&branch=#{branch}&owner=#{owner}")
if script_path.present?
deploy_key = EduSetting.find_by_name("site_page_deploy_key")
uri = URI.parse("http://gitlink.kingchan.cn/gitlink_execute_script?key=#{deploy_key}&script_path=#{script_path}&project_dir=#{project_dir}&repo=#{repo}&repo_link=#{repo_link}&branch=#{branch}&owner=#{owner}")
response = Net::HTTP.get_response(uri)
Rails.logger.info "################### PageService deploy #{response.body}"
return response.body