Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build books on GHA #44

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/books.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
DIR_DOWNLOADS="downloads"
echo "Making ebooks ..."

sudo apt-get install pandoc

pandoc -o $DIR_DOWNLOADS/typescript-book.epub --metadata title="The Concise TypeScript Book" --metadata author="Simone Poggiali" -s README.md
pandoc -o $DIR_DOWNLOADS/typescript-book-zh_CN.epub --metadata title="# 简洁的TypeScript之书" --metadata author="Simone Poggiali" -s README-zh_CN.md

git config user.name "GitHub Actions Bot"
git config user.email "<>"

git add -A
git commit -m 'Automatically add books'
git push
6 changes: 6 additions & 0 deletions .github/workflows/validate-content.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,11 @@ jobs:
- uses: actions/checkout@v3
- name: Run compile script
run: bash ${GITHUB_WORKSPACE}/.github/workflows/compile.sh
make-books:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: make books
run: bash ${GITHUB_WORKSPACE}/.github/workflows/books.sh


Binary file modified downloads/typescript-book-zh_CN.epub
Binary file not shown.
Binary file modified downloads/typescript-book.epub
Binary file not shown.
Binary file added downloadsXXX/typescript-book-zh_CN.epub
Binary file not shown.
Binary file added downloadsXXX/typescript-book.epub
Binary file not shown.