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

Cria gh action workflow para automatizar da geração de um arquivo epub #16

Closed
wants to merge 1 commit into from
Closed
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
33 changes: 33 additions & 0 deletions .github/workflows/ebook.yaml
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