mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-15 21:36:52 +00:00
Auto-deploy commits to master
This commit is contained in:
parent
721bbb6918
commit
a142baf14f
@ -2,4 +2,10 @@ language: ruby
|
||||
sudo: false
|
||||
cache: bundler
|
||||
script: rake generate
|
||||
after_success: '[ "${TRAVIS_BRANCH}" = "master" ] && [ "${TRAVIS_PULL_REQUEST}" = "false" ] && rake deploy || false'
|
||||
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:
|
||||
secure: RgYtd9+qY3kBrDbAqSGszBEiZIalPzSd72a0w4zyG1FX4B/xA9ilqH1mLaBbjNsuwsDIfW6D4Vupec8Uh/eBtLKAt05pdZ70WiP9TYg1QRQS9k5epaqbOvxFzIzQO4Mcz1dT0tuMJ9c0H9VXUjFJVtCG17vkPpK3qHkYW0GAxqE=
|
||||
|
11
Rakefile
11
Rakefile
@ -264,8 +264,17 @@ multitask :push do
|
||||
message = "Site updated at #{Time.now.utc}"
|
||||
puts "\n## Committing: #{message}"
|
||||
system "git commit -m \"#{message}\""
|
||||
|
||||
puts "\n## Pushing generated #{deploy_dir} website"
|
||||
Bundler.with_clean_env { system "git push origin #{deploy_branch}" }
|
||||
if ENV["GH_TOKEN"].nil?
|
||||
# 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" }
|
||||
end
|
||||
|
||||
puts "\n## Github Pages deploy complete"
|
||||
end
|
||||
end
|
||||
|
2
_deploy
2
_deploy
@ -1 +1 @@
|
||||
Subproject commit 81633dd5dc0a37358adb5c2ef0db18af0e7ac488
|
||||
Subproject commit 42e481f37c2a10930f2581c92053b87e25fcdc37
|
Loading…
x
Reference in New Issue
Block a user