-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: modify workflows for machine translation
* created separate "send" workflow since we want to send documents for machine translation on a different schedule than normal. * updated "queue" workflow to have both project_ids since it needs both in order to correctly populate data for the new project_id column. * updated "download" workflow to have a separate job for downloading & PRing machine translated documents.
- Loading branch information
1 parent
915e8b8
commit a8829ea
Showing
3 changed files
with
124 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Send content to be translated | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
# At 1 am on the 1st and 15th day of a month | ||
- cron: '0 1 * * *' | ||
|
||
env: | ||
TRANSLATION_VENDOR_API_URL: ${{ secrets.TRANSLATION_VENDOR_API_URL }} | ||
TRANSLATION_VENDOR_PROJECT: ${{ secrets.TRANSLATION_VENDOR_MT_PROJECT }} | ||
TRANSLATION_VENDOR_USER: ${{ secrets.TRANSLATION_VENDOR_MT_USER }} | ||
TRANSLATION_VENDOR_SECRET: ${{ secrets.TRANSLATION_VENDOR_MT_SECRET }} | ||
DB_CONNECTION_INFO: ${{ secrets.DB_CONNECTION_INFO }} | ||
|
||
jobs: | ||
send-content: | ||
name: Send content | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
|
||
- name: Cache dependencies | ||
id: yarn-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: Install dependencies | ||
if: steps.yarn-cache.outputs.cache-hit != 'true' | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Get content to be translated and send to vendor | ||
run: node ./scripts/actions/send-and-update-translation-queue.js |