diff --git a/.travis.yml b/.travis.yml index 667746f4..9b51bde7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,19 @@ # For more information about the configurations used # in this file, please see the Travis CI documentation: -# http://docs.travis-ci.com +# https://docs.travis-ci.com after_success: - - ./scripts/travis/auto_update_dist.sh + - | + + # Automatically update the content from the `dist/` directory + + $(npm bin)/travis-after-all \ + && $(npm bin)/set-up-ssh -k "$encrypted_7289798db853_key" \ + -iv "$encrypted_7289798db853_iv" \ + --path-encrypted-key ".travis/github_deploy_key.enc" \ + && $(npm bin)/commit-changes --branch "master" \ + --commands "npm run build" \ + --commit-message "Update content from the \`dist\` directory [skip ci]" env: global: diff --git a/scripts/travis/github_deploy_key.enc b/.travis/github_deploy_key.enc similarity index 100% rename from scripts/travis/github_deploy_key.enc rename to .travis/github_deploy_key.enc diff --git a/package.json b/package.json index afbbded0..52eec562 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ ] }, "devDependencies": { - "@alrra/travis-scripts": "^2.0.0", + "@alrra/travis-scripts": "^2.1.0", "apache-server-configs": "2.14.0", "archiver": "^0.21.0", "babel-core": "^6.7.2", diff --git a/scripts/travis/auto_update_dist.sh b/scripts/travis/auto_update_dist.sh deleted file mode 100755 index a396fe67..00000000 --- a/scripts/travis/auto_update_dist.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -declare -r PRIVATE_KEY_FILE_NAME='github_deploy_key' - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Decrypt the file containing the private key - -openssl aes-256-cbc \ - -K $encrypted_7289798db853_key \ - -iv $encrypted_7289798db853_iv \ - -in "$(dirname "$BASH_SOURCE")/${PRIVATE_KEY_FILE_NAME}.enc" \ - -out ~/.ssh/$PRIVATE_KEY_FILE_NAME -d - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Enable SSH authentication - -chmod 600 ~/.ssh/$PRIVATE_KEY_FILE_NAME -echo "Host github.com" >> ~/.ssh/config -echo " IdentityFile ~/.ssh/$PRIVATE_KEY_FILE_NAME" >> ~/.ssh/config - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Automatically update the content from the `dist/` directory - -$(npm bin)/travis-after-all && \ - $(npm bin)/commit-changes --branch "master" \ - --commands "npm run build" \ - --commit-message "Update content from the \`dist\` directory [skip ci]"