From 7d65458bc5c1a2fbd05735bd4ceebddd1105ef9f Mon Sep 17 00:00:00 2001 From: "Ramon G. da Silva" <47225177+ramongss@users.noreply.github.com> Date: Wed, 22 Mar 2023 18:31:41 -0300 Subject: [PATCH] Adiciona github actions para gerar epub a partir do livro.adoc --- .github/workflows/ebook.yaml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/ebook.yaml diff --git a/.github/workflows/ebook.yaml b/.github/workflows/ebook.yaml new file mode 100644 index 0000000..18907df --- /dev/null +++ b/.github/workflows/ebook.yaml @@ -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