-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.54 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Transifex Workflow
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '11 21 * * *'
workflow_dispatch:
jobs:
transifex:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Download the CLI
run: curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash -s -- latest
working-directory: ${{ github.workspace }}
shell: bash
- name: Initialize Transifex
run: |
./tx init
shell: bash
working-directory: ${{ github.workspace }}
- name: Add Transifex remotes
run: |
./tx add remote --file-filter 'projects/<project_slug>/<lang>/<resource_slug>' --minimum-perc 100 https://app.transifex.com/hisp-uio/docs-full-site/dashboard/
./tx add remote --file-filter 'projects/<project_slug>/<lang>/<resource_slug>' --minimum-perc 100 https://app.transifex.com/hisp-uio/dhis2-single-page-docs/dashboard/
shell: bash
working-directory: ${{ github.workspace }}
with:
TX_TOKEN: ${{ secrets.TRANSIFEX_DOCS_CACHE_TOKEN }}
- name: Pull Transifex resources
run: |
./tx pull --all
shell: bash
working-directory: ${{ github.workspace }}
with:
TX_TOKEN: ${{ secrets.TRANSIFEX_DOCS_CACHE_TOKEN }}
- name: Commit & Push changes
uses: actions-js/push@master
with:
directory: website/data/
branch: master
github_token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }}