Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added documentation about travis token #1902

Merged
merged 3 commits into from
Jan 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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