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 and deploy ePub e-book files #1795

Merged
merged 3 commits into from
Oct 13, 2024
Merged
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
6 changes: 6 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,16 @@ jobs:
uses: actions/checkout@v3
with:
persist-credentials: false
- uses: awalsh128/cache-apt-pkgs-action@v1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had not seen this action before. I'm not sure how much the cache really saves, but I do like the style

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used it so I don't have to remember how to make apt well-behaved for non-interactive use. From the top of my head, that'd at least involve

  • use old apt-get commands instead of the new apt ones
  • call apt-get update before apt-get install, as otherwise the packages might not be known
  • use -y option for both these commands
  • set environment variable DEBIAN_FRONTEND to noninteractive before all that

I haven't known this action before either, but seen it recommended in this Stack Overflow answer to the question How to apt-get install in a GitHub Actions workflow?.

with:
packages: calibre rename
- name: Install and Build
run: |
npm install
npx honkit build
npx honkit epub
rename 's/^book/django-girls-tutorial/' book_*.epub
mv *.epub _book/
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
Expand Down
5 changes: 5 additions & 0 deletions en/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ Welcome to the Django Girls Tutorial! We are happy to see you here. :) In this t

As with all unknown things, this is going to be an adventure - but no worries, since you already worked up the courage to be here, you'll be just fine. :)

{% if output.name != "ebook" %}
> Do you want to read this tutorial on your e-reader?
> Then [download the Django Girls Tutorial as an e-book in ePub format](../django-girls-tutorial_{{ book.language }}.epub).
{% endif %}

## Introduction

Have you ever felt that the world is more and more about technology to which you cannot (yet) relate? Have you ever wondered how to create a website but have never had enough motivation to start? Have you ever thought that the software world is too complicated for you to even try doing something on your own?
Expand Down
Loading