diff --git a/.travis.yml b/.travis.yml index c1a78bde..5bc031e8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,17 @@ language: python git: depth: false +before_install: + - >- + openssl aes-256-cbc + -K $encrypted_8ebb1ef83f64_key + -iv $encrypted_8ebb1ef83f64_iv + -in github_deploy_key.enc + -out github_deploy_key + -d + - chmod 600 github_deploy_key + - eval $(ssh-agent -s) + - ssh-add github_deploy_key python: - "3.6" script: diff --git a/ci/update-overlay.sh b/ci/update-overlay.sh index 78a57935..506075b7 100755 --- a/ci/update-overlay.sh +++ b/ci/update-overlay.sh @@ -75,9 +75,8 @@ push_changes () { return 1 fi - if ! git remote add origin "https://${GITHUB_OAUTH_TOKEN}:x-oauth-basic@github.com/dimitarnestorov/nix-google-fonts-overlay.git" >/dev/null 2>&1; then + if ! git remote add origin "git@github.com:dimitarnestorov/nix-google-fonts-overlay.git" >/dev/null 2>&1; then echo "Failed to add origin"; - return 1 fi if ! git push origin master --quiet >/dev/null 2>&1; then @@ -85,11 +84,6 @@ push_changes () { return 1 fi - if ! git remote rm origin >/dev/null 2>&1; then - echo "Failed to remove origin" - return 1 - fi - echo "Done" } diff --git a/github_deploy_key.enc b/github_deploy_key.enc new file mode 100644 index 00000000..974b270e Binary files /dev/null and b/github_deploy_key.enc differ