-
Notifications
You must be signed in to change notification settings - Fork 33
43 lines (41 loc) · 1.62 KB
/
preview-translations.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
name: Preview translations
on:
repository_dispatch:
jobs:
pull_push_preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/cache@v1
with:
path: ~/cache/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Pull Lokalize translations
env:
LOCALIZE_TOKEN: ${{ secrets.LOCALIZE_TOKEN }}
IMPORT_LANG: ${{ github.event.client_payload.lang }}
run: |
mv docker-compose.ci.yml docker-compose.override.yml
./import-translations.sh $LOCALIZE_TOKEN $IMPORT_LANG
mv docker-compose.override.yml docker-compose.ci.yml
- name: Commit changes to Branch
env:
IMPORT_LANG: ${{ github.event.client_payload.lang }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ secrets.GITHUB_REPOSITORY }}
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
run: ./_scripts/push-translations.sh
- name: Build Jekyll site
run: |
mv docker-compose.ci.yml docker-compose.override.yml
docker-compose run --rm web /bin/bash -c "(bundle check || bundle install --jobs=3) && bundle exec jekyll build"
- uses: amondnet/vercel-action@v19
with:
vercel-token: ${{ secrets.ZEIT_TOKEN }}
zeit-team-id: ${{ secrets.ZEIT_TEAM_ID }}
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-org-id: ${{ secrets.NOW_ORG_ID }}
vercel-project-id: ${{ secrets.NOW_PROJECT_ID }}
working-directory: ./build