Merge pull request '调整个人建站时key获取' (#108) from KingChan/forgeplus:chenjing into standalone_develop

This commit is contained in:
KingChan 2023-08-18 11:51:26 +08:00
commit e5e2f48126
1 changed files with 3 additions and 2 deletions

View File

@ -52,7 +52,8 @@ class PageService
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}")
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