-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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?
@@ -23,10 +23,16 @@ jobs: | |||
uses: actions/checkout@v3 | |||
with: | |||
persist-credentials: false | |||
- uses: awalsh128/cache-apt-pkgs-action@v1 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 newapt
ones - call
apt-get update
beforeapt-get install
, as otherwise the packages might not be known - use
-y
option for both these commands - set environment variable
DEBIAN_FRONTEND
tononinteractive
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?.
.github/workflows/deploy.yml
Outdated
- uses: awalsh128/cache-apt-pkgs-action@v1 | ||
with: | ||
packages: calibre | ||
version: 1.0 |
There was a problem hiding this comment.
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.
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? |
I think that's a good idea. |
(In the English version, for now. Translations can be contributed via Crowdin.)
See a run of these actions here.Results available fromhttps://das-g.github.io/django-girls-tutorial/book_<lang>.epub
, e.g. for English https://das-g.github.io/django-girls-tutorial/book_en.epubBefore 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.epubcloses #1785