mirror of
https://github.com/yihong0618/bilingual_book_maker.git
synced 2025-06-06 11:35:49 +00:00
ci: only run when have secret
This commit is contained in:
parent
4219f9c31d
commit
671957f0b4
3
.github/workflows/make_test_ebook.yaml
vendored
3
.github/workflows/make_test_ebook.yaml
vendored
@ -9,6 +9,7 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
|
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
|
||||||
|
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
testing:
|
testing:
|
||||||
@ -31,8 +32,10 @@ jobs:
|
|||||||
- name: install python requirements
|
- name: install python requirements
|
||||||
run: pip install -r requirements.txt
|
run: pip install -r requirements.txt
|
||||||
- name: make test ebook
|
- name: make test ebook
|
||||||
|
if: env.OPENAI_API_KEY != null
|
||||||
run: python3 make_book.py --book_name "test_books/${{ env.EPUB_FILENAME_BASE}}.epub" --no_limit --test --test_num 2 --language zh-hans --openai_key ${{secrets.OPENAI_API_KEY }}
|
run: python3 make_book.py --book_name "test_books/${{ env.EPUB_FILENAME_BASE}}.epub" --no_limit --test --test_num 2 --language zh-hans --openai_key ${{secrets.OPENAI_API_KEY }}
|
||||||
- name: Rename and Upload ePub
|
- name: Rename and Upload ePub
|
||||||
|
if: env.OPENAI_API_KEY != null
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: epub_output
|
name: epub_output
|
||||||
|
Loading…
x
Reference in New Issue
Block a user