mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-22 16:56:50 +00:00
Fix deploys
This commit is contained in:
parent
a142baf14f
commit
7519b4f0e0
@ -3,8 +3,6 @@ sudo: false
|
||||
cache: bundler
|
||||
script: rake generate
|
||||
after_success:
|
||||
- git config user.name "Travis CI"
|
||||
- git config user.email "balloob+bot@gmail.com"
|
||||
- '[ "${TRAVIS_BRANCH}" = "master" ] && [ "${TRAVIS_PULL_REQUEST}" = "false" ] && rake deploy || false'
|
||||
env:
|
||||
global:
|
||||
|
8
Rakefile
8
Rakefile
@ -267,12 +267,14 @@ multitask :push do
|
||||
|
||||
puts "\n## Pushing generated #{deploy_dir} website"
|
||||
if ENV["GH_TOKEN"].nil?
|
||||
# Bundler.with_clean_env { system "git push origin #{deploy_branch}" }
|
||||
Bundler.with_clean_env { system "git push origin #{deploy_branch}" }
|
||||
else
|
||||
puts "## Using GH_TOKEN"
|
||||
new_origin = `git remote -v | grep origin | grep push | awk '{print $2}'`.chomp.sub('//', "//#{ENV['GH_TOKEN']}@")
|
||||
Bundler.with_clean_env { system "git remote add origin-auth #{new_origin} > /dev/null 2>&1" }
|
||||
Bundler.with_clean_env { system "git push --quiet origin-auth #{deploy_branch} > /dev/null 2>&1" }
|
||||
system 'git config user.name "Travis CI"'
|
||||
system 'git config user.email "balloob+bot@gmail.com"'
|
||||
system "git remote add origin-auth #{new_origin} > /dev/null 2>&1"
|
||||
system "git push --quiet origin-auth #{deploy_branch} > /dev/null 2>&1"
|
||||
end
|
||||
|
||||
puts "\n## Github Pages deploy complete"
|
||||
|
Loading…
x
Reference in New Issue
Block a user