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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

build and deploy ePub e-book files #1795

wants to merge 3 commits into from

Conversation

das-g
Copy link
Member

@das-g das-g commented Apr 27, 2023

See a run of these actions here.

Results available from https://das-g.github.io/django-girls-tutorial/book_<lang>.epub, e.g. for English https://das-g.github.io/django-girls-tutorial/book_en.epub

Before merging this, we'll probably want to have more meaningful file names, e.g. django-girls-tutorial_en.epub.

Results available from https://das-g.github.io/django-girls-tutorial/django-girls-tutorial_<lang>.epub, e.g. for English https://das-g.github.io/django-girls-tutorial/django-girls-tutorial_en.epub

closes #1785

@das-g das-g requested a review from ekohl April 27, 2023 20:41
Copy link
Collaborator

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

I wonder how people discover we have these. Is there anything that links to it?

.github/workflows/deploy.yml Outdated Show resolved Hide resolved
@@ -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?.

- uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: calibre
version: 1.0
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it needed to specify a version? Reading through the source I see this is the cache version, not the calibre version. I'd suggest to drop it and only add it once we need it. You can also purge caches via the UI nowadays so it's not needed as much anymore.

@das-g
Copy link
Member Author

das-g commented May 3, 2023

Is there anything that links to it?

Not yet. But https://github.com/DjangoGirls/tutorial/blob/master/LANGS.md?plain=1 has the paths to the HTML versions of the various translations hardcoded anyway, so I guess we could also include hardcoded links to the ePub files?

@ekohl
Copy link
Collaborator

ekohl commented May 4, 2023

I think that's a good idea.

@das-g das-g marked this pull request as ready for review October 8, 2023 09:09
@das-g das-g requested a review from a team as a code owner October 8, 2023 09:09
(In the English version, for now.
Translations can be contributed via Crowdin.)
@das-g das-g requested a review from ekohl October 8, 2023 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants