Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wwwanlingxiao
public-apis
Commits
4e2df625
Commit
4e2df625
authored
May 25, 2017
by
Dave Machado
Browse files
Set Travis to deploy new JSON onto master
parent
b0ef43db
Changes
2
Show whitespace changes
Inline
Side-by-side
.travis.yml
View file @
4e2df625
...
...
@@ -8,5 +8,6 @@ script:
after_script
:
-
cd build
-
sh build.sh
-
sh deploy.sh
notifications
:
email
:
false
build/deploy.sh
0 → 100644
View file @
4e2df625
#!/bin/bash
set
-o
errexit
-o
nounset
if
[
"
$TRAVIS_BRANCH
"
!=
"master"
]
then
echo
"This commit was made against
$TRAVIS_BRANCH
and not master! No deploy!"
exit
0
fi
rev
=
$(
git rev-parse
--short
HEAD
)
mkdir
deploy
cd
deploy
git init
git config user.name
"Travis CI"
git config user.email
"build@travis.org"
git remote add upstream
"https://
$GH_TOKEN
@github.com/davemachado/public-apis.git"
git fetch upstream
git reset upstream/master
mv
../json/
*
touch
.
git add
-A
.
git commit
-m
"rebuild JSON at
${
rev
}
"
git push upstream HEAD:master
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment