We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
ssh 连接服务器,进入部署的 rails 程序目录,创建 shared/deploy/sh/bearychat_incoming.sh
touch shared/deploy/sh/bearychat_incoming.sh chmod +x shared/deploy/sh/bearychat_incoming.sh
复制如下内容到文件,并进行适当的修改
#!/bin/bash webhook_url="https://hook.bearychat.com/=bw8WG/incoming/e5b3a02bef73b9092794124df29959a5" text="kc 已经部署新的版本" title="访问地址" url="https://kc.com/" color="#40B5F0" json=" { \"text\": \"$text\", \"attachments\": [ { \"title\": \"$title\", \"text\": \"$url\", \"color\": \"$color\" } ] } " curl $webhook_url \ -H 'Content-Type: application/json' \ -d "$json"
本地打开 config/deploy.rb 增加两行配置
set :shared_paths, [ # 增加这一行 'deploy/sh/bearychat_incoming.sh' ] task :deploy => :environment do deploy do invoke :'git:clone' invoke :'deploy:link_shared_paths' to :launch do queue %[ source /etc/profile bundle cnpm install RAILS_ENV=production bundle exec rake assets:precompile ./deploy/sh/unicorn.sh stop ./deploy/sh/unicorn.sh start # 增加这一行 ./deploy/sh/bearychat_incoming.sh ] end end end
修改完提交到版本库
下次运行 bundle exec mina deploy 部署后就会发送通知到 bearychat 了
The text was updated successfully, but these errors were encountered:
No branches or pull requests
创建 bearychat incoming 机器人,复制 hook 地址
创建并编写 bearychat_incoming.sh 脚本
ssh 连接服务器,进入部署的 rails 程序目录,创建 shared/deploy/sh/bearychat_incoming.sh
复制如下内容到文件,并进行适当的修改
修改 config/deploy.rb 文件
本地打开 config/deploy.rb
增加两行配置
修改完提交到版本库
下次运行 bundle exec mina deploy 部署后就会发送通知到 bearychat 了
The text was updated successfully, but these errors were encountered: