From 7ceb16c95f7224fdb00120845e18c2e81ae34fe8 Mon Sep 17 00:00:00 2001
From: chrisgarrity <chrisg@media.mit.edu>
Date: Thu, 6 Dec 2018 08:50:33 -0500
Subject: [PATCH] Add deploy step to push translations in travis
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Should only run if it’s running as cron
---
 .travis.yml | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index ba21af324..9290080d2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -35,6 +35,7 @@ deploy:
     - master
     - develop
     - smoke
+    condition: $TRAVIS_EVENT_TYPE != cron
   skip_cleanup: true
   email: $NPM_EMAIL
   api_key: $NPM_TOKEN
@@ -44,6 +45,7 @@ deploy:
     branch:
     - master
     - $PREVIEW_BRANCH
+    condition: $TRAVIS_EVENT_TYPE != cron
   access_key_id: $AWS_ACCESS_KEY_ID
   secret_access_key: $AWS_SECRET_ACCESS_KEY
   bucket: $AWS_BUCKET_NAME
@@ -53,11 +55,19 @@ deploy:
 - provider: script
   on:
     all_branches: true
+    condition: $TRAVIS_EVENT_TYPE != cron
   skip_cleanup: true
   script: npm run deploy -- -x -e $TRAVIS_BRANCH -r https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git
 - provider: script
   on:
     all_branches: true
+    condition: $TRAVIS_EVENT_TYPE != cron
   script: npm run prune -- https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git
+- provider: script
+  on:
+    branch: develop
+    condition: $TRAVIS_EVENT_TYPE == cron
+  skip_cleanup: true
+  script: npm run i18n:src && npm run i18n:push
 after_deploy:
 - 'curl -X POST -H "Fastly-Key: $FASTLY_TOKEN" -H "Accept: application/json" https://api.fastly.com/service/$FASTLY_SERVICE_ID/purge_all'
-- 
GitLab