2019-01-04 17:25:30 +00:00
|
|
|
language: node_js
|
2019-01-04 17:45:52 +00:00
|
|
|
- "node"
|
2019-01-05 11:59:16 +00:00
|
|
|
|
|
|
|
stages:
|
2019-01-05 12:10:55 +00:00
|
|
|
- name: test
|
2019-01-06 19:08:23 +00:00
|
|
|
- name: build
|
2019-01-05 11:59:16 +00:00
|
|
|
if: branch = "master"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
include:
|
|
|
|
- stage: test
|
|
|
|
script: ./bin/test.sh
|
|
|
|
- stage: build
|
2019-01-06 21:14:32 +00:00
|
|
|
script:
|
2019-01-06 21:49:20 +00:00
|
|
|
- npm --force install tiddlywiki
|
2019-01-07 16:29:42 +00:00
|
|
|
- pwd
|
|
|
|
- cd output
|
|
|
|
- git init
|
|
|
|
- git config --global user.email "travis@travis-ci.org"
|
|
|
|
- git config --global user.name "Travis CI"
|
|
|
|
- git remote add upstream "https://$GH_TOKEN@github.com/Jermolene/Testing2019.git"
|
|
|
|
- git fetch upstream
|
|
|
|
- git reset upstream/master
|
|
|
|
- cd ..
|
|
|
|
- export TW5_BUILD_DETAILS="Built from branch '$TRAVIS_BRANCH' at commit $(git rev-parse HEAD) of $(git remote get-url origin)"
|
2019-01-06 21:41:36 +00:00
|
|
|
- export TW5_BUILD_TIDDLYWIKI='./node_modules/tiddlywiki/tiddlywiki.js'
|
2019-01-06 21:14:32 +00:00
|
|
|
- ./bin/build-site.sh
|
2019-01-07 16:29:42 +00:00
|
|
|
- cd output
|
|
|
|
- git add -A .
|
|
|
|
- git commit --message "Travis build: $TRAVIS_BUILD_NUMBER"
|
|
|
|
- git push -q upstream HEAD:master >/dev/null 2>&1
|
|
|
|
- cd ..
|