-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adiciona github actions para gerar epub a partir do livro.adoc
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Generate epub | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
Generate: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.0 | ||
|
||
- name: Install Asciidoctor EPUB3 | ||
run: gem install asciidoctor-epub3 | ||
|
||
- name: Generate EPUB from AsciiDoc | ||
run: | | ||
asciidoctor-epub3 livro.adoc -o 'Python Fluente, Segunda Edição (2023).epub' | ||
- name: Save EPUB to Repository | ||
run: | | ||
git config user.name '${{ secrets.GIT_USER_NAME }}' | ||
git config user.email '${{ secrets.GIT_USER_EMAIL }}' | ||
git add 'Python Fluente, Segunda Edição (2023).epub' | ||
git commit -m 'Gerando nova versão do epub' | ||
git push origin |