Skip to content

Commit faff94d

Browse files
committed
Push back to the source repo from a different directory (using a GITHUB_TOKEN)
1 parent d5f82ec commit faff94d

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

Diff for: deploy.sh

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
#!/bin/sh
22

3+
cd $HOME
4+
35
git config --global user.email "[email protected]"
46
git config --global user.name "Travis CI"
57

6-
git add -f screenshots
7-
git commit --message "Travis deploy: $TRAVIS_JOB_NUMBER"
8+
git clone --quiet --branch=master https://${GITHUB_TOKEN}@github.com/rigor789/nativescript-vue-ui-tests.git deploy > /dev/null 2>&1
89

9-
git remote add origin-push https://${GITHUB_TOKEN}@github.com/rigor789/nativescript-vue-ui-tests.git > /dev/null 2>&1
10+
cd deploy
11+
cp -R $TRAVIS_BUILD_DIR/screenshots .
1012

11-
git pull origin-push master
13+
git add -f screenshots
14+
git commit --message "[Travis Screenshots: $TRAVIS_JOB_NUMBER] [skip ci]"
1215

13-
git push origin-push master
16+
git pull --force origin master
17+
git push --force origin master

0 commit comments

Comments
 (0)