Skip to content

Commit 87ed597

Browse files
committed
Tweak build scripts to build only on master
This makes the default branch `master` - which, whenever built, will trigger a change to gh-pages branch and subsequently the site updates.
1 parent 1f5ba6b commit 87ed597

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,4 @@ node_js:
1212
before_install:
1313
- rvm install 2.2.2
1414
script:
15-
- 'bundle install'
16-
- 'make nightly'
15+
- 'make pages'

Makefile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,18 +87,19 @@ docs-server:
8787
@bundle exec jekyll serve
8888

8989
#
90-
# Nightly data build process
90+
# Pages data build process
9191
#
92-
ifeq ($(shell git --no-pager show -s --format="%aN" HEAD), ChaiJs Bot)
93-
nightly:
94-
@echo "Cowardly refusing to build nightly"
92+
ifneq ($(TRAVIS_BRANCH), master)
93+
pages:
94+
@echo "Cowardly refusing to build pages"
9595
else
96-
nightly: clean plugins releases api-docs
96+
pages: install clean plugins releases api-docs
97+
@echo "Comitting to gh-pages"
9798
@git config user.name "ChaiJs Bot"
9899
@git config user.email "[email protected]"
99100
@git add -f _data
100101
@git commit -m '(data): Auto build _data'
101-
@git push "https://${GH_TOKEN}@github.com/chaijs/chai-docs" HEAD:refs/heads/gh-pages
102+
@git push "https://${GH_TOKEN}@github.com/chaijs/chai-docs" HEAD:refs/heads/gh-pages -f
102103
endif
103104

104105
.PHONY: all api-docs releases plugins install clean-plugins clean-api-docs docs-server nightly chaijs

0 commit comments

Comments
 (0)