mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
CI: Pull scripts out into files
Still trying to get the github integration working
This commit is contained in:
parent
1d9c932e16
commit
a2d4239db0
17
.travis.yml
17
.travis.yml
@ -12,21 +12,8 @@ jobs:
|
||||
script: ./bin/test.sh
|
||||
- stage: build
|
||||
script:
|
||||
- npm --force install tiddlywiki
|
||||
- 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 ..
|
||||
- ./bin/travis-pre-build.sh
|
||||
- export TW5_BUILD_DETAILS="Built from branch '$TRAVIS_BRANCH' at commit $(git rev-parse HEAD) of $(git remote get-url origin)"
|
||||
- export TW5_BUILD_TIDDLYWIKI='./node_modules/tiddlywiki/tiddlywiki.js'
|
||||
- ./bin/build-site.sh
|
||||
- cd output
|
||||
- git add -A .
|
||||
- git commit --message "Travis build: $TRAVIS_BUILD_NUMBER"
|
||||
- git push -q upstream HEAD:master >/dev/null 2>&1
|
||||
- cd ..
|
||||
- ./bin/travis-push.sh
|
||||
|
23
bin/travis-pre-build.sh
Executable file
23
bin/travis-pre-build.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Pull existing GitHub pages content
|
||||
|
||||
npm --force install tiddlywiki || exit 1
|
||||
|
||||
mkdir -p output || exit 1
|
||||
|
||||
cd output || exit 1
|
||||
|
||||
git init || exit 1
|
||||
|
||||
git config --global user.email "travis@travis-ci.org" || exit 1
|
||||
|
||||
git config --global user.name "Travis CI" || exit 1
|
||||
|
||||
git remote add upstream "https://$GH_TOKEN@github.com/Jermolene/Testing2019.git" || exit 1
|
||||
|
||||
git fetch upstream || exit 1
|
||||
|
||||
git reset upstream/master || exit 1
|
||||
|
||||
cd .. || exit 1
|
13
bin/travis-push.sh
Executable file
13
bin/travis-push.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Push output back to GitHub
|
||||
|
||||
cd output || exit 1
|
||||
|
||||
git add -A . || exit 1
|
||||
|
||||
git commit --message "Travis build: $TRAVIS_BUILD_NUMBER" || exit 1
|
||||
|
||||
git push -q upstream HEAD:master >/dev/null 2>&1 || exit 1
|
||||
|
||||
cd .. || exit 1
|
Loading…
Reference in New Issue
Block a user