Skip to content

Update chapter-05-governance.adoc #230

Update chapter-05-governance.adoc

Update chapter-05-governance.adoc #230

Workflow file for this run

name: Build Book 📖
# Controls when the action will run.
# Triggers the workflow on push events for the main branch.
on:
push:
branches:
- main
# A workflow run is made up of one or more jobs that can run sequentially or in parallel.
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# 1. Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout repository
uses: actions/checkout@v4
# 2. Sets up Ruby and Bundler, then installs your dependencies from Gemfile.lock
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4.4' # Or any other recent version
bundler-cache: true # Runs 'bundle install' and caches gems
# 3. Asciidoctor Diagram requires Graphviz to render diagrams.
# This step installs it on the runner.
- name: Install Graphviz
run: sudo apt-get update && sudo apt-get install -y graphviz
# 4. Runs the 'make epub' command which builds the epub.
- name: Build EPUB
run: make epub
# 5. Uploads the generated EPUB from the 'dist' directory as a build artifact.
- name: Upload EPUB Artifact 📱
uses: actions/upload-artifact@v4
with:
name: Book-EPUB
path: dist/mastering-cardano-v1.0.0.epub
# 6. Copies the downsized images into the images folder to make the pdf build faster.
- name: Copy downsized images
run: cp images-downscaled/* images/
# 7. Runs the 'make pdf' command which builds the pdf file.
- name: Build PDF
run: make pdf
# 8. Uploads the generated PDF from the 'dist' directory as a build artifact.
- name: Upload PDF Artifact 📄
uses: actions/upload-artifact@v4
with:
name: Book-PDF
path: dist/mastering-cardano-v1.0.0.pdf