Skip to content

Commit

Permalink
add documentation about Travis token (#1902)
Browse files Browse the repository at this point in the history
  • Loading branch information
agnivade authored and waldyrious committed Jan 18, 2018
1 parent 6dab5ae commit fa3828c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ after_failure:

env:
global:
- secure: ewQMcFd3wH8IHOeGhIkBr2kAgadONmesv2KB+9bPRCZ5gvtFFwlkCMdPnQBR9Kd3GKC8r+EO0JNNFWOvrDjPYhEHi9Ab26Q/qodwfwne9YloKXT+C48Zrbrj8q7kb/FeMYPev+RMuM96j5E5QyqBVohGP7hC2bpU3mvAhQ2wBCE=
# Used to upload the tldr archive to tldr-pages repo.
# Achieved via the upload_assets() function of scripts/build.sh
# This is an encrypted form of @agnivade's user token.
- secure: AJPra/q3bCFHzMOam1aFz4tzasYuU261Mk6lISh1VJatibHa7nBErsuA3VbR5qth9LblH5HFmNGl4bwmas/PTD1P3lPAHO19gdlMb1kpS9MhTojQP/0EPCsyMTgnWcmNMU2XMvYGHFT0JFn4vj/0TrM9CUMDoT9WhtnVJfgRrlY=
2 changes: 2 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env bash

# This script is executed by Travis CI when a PR is merged (i.e. in the `after_success` step).
set -ev

function initialize {
Expand Down Expand Up @@ -28,6 +29,7 @@ function build_archive {
}

function upload_assets {
# ${GH_TOKEN} is defined as a secure variable inside .travis.yml
git clone --quiet --depth 1 https://${GH_TOKEN}@${SITE_URL} $SITE_HOME
mv -f $TLDR_ARCHIVE $SITE_HOME/assets/
cp -f $TLDRHOME/pages/index.json $SITE_HOME/assets/
Expand Down

0 comments on commit fa3828c

Please sign in to comment.