forked from yihong0618/bilingual_book_maker
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (40 loc) · 1.14 KB
/
make_test_ebook.yaml
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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
BBM_CAIYUN_API_KEY: ${{ secrets.BBM_CAIYUN_API_KEY }}
BBM_DEEPL_API_KEY: ${{ secrets.BBM_DEEPL_API_KEY }}
jobs:
testing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install python 3.9
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip' # caching pip dependencies
- name: Check formatting (black)
run: |
pip install black
black . --check
- name: install python requirements
run: pip install -r requirements.txt
- name: Test install
run: |
pip install .
- name: translate
run: |
python3 make_book.py --book_name "animal_farm.epub" --language zh-hans
- name: Rename and Upload ePub
if: env.OPENAI_API_KEY != null
uses: actions/upload-artifact@v2
with:
name: epub_output
path: "animal_farm_bilingual.epub"