Skip to content

Commit

Permalink
Alpha version of the translated book and huge french version improvem…
Browse files Browse the repository at this point in the history
…ents (#36)

* Adding initial translation in english

* Exact translations for citations

* Drastically improved english version, reworded small part of fr chapter

* Fixed links

* Now supporting CI for both languages

* Fished links

* Fished links

* Fished links

* Fixed references

* Fixed MD links to titles, adapted FR links to en-US or en-CA resources, adapted salaries to US ones, adapted some explanation for americans

* removed 'in french' mentions

* Improved README for english version

* Added english files and drastically improved translations

* Improved presentation of readme

* Added book's landing page

* Adjusted visuals

* Editing links

* Updated links

* Updated link

* Massive correction of spelling, expressions and formatting.

* Improved display of links to books

* Fixed wording

* Added semicolons formalism

* Formatting table

* Added reference to retex/debrief

* Added newpage at some table locations

* Bumping version to 1.1.0-alpha

* Improved PDF version layout and updated citation reference

* Fixed link fragment

* Updated CITATION reference

* Updating condition on which the check-404-links is run

* Fixed broken links

* Increasing timeout for latribune.fr

* Avoiding timeout for latribune.fr
  • Loading branch information
flavienbwk authored Nov 12, 2023
1 parent 980e74c commit d764056
Show file tree
Hide file tree
Showing 270 changed files with 5,620 additions and 557 deletions.
2 changes: 2 additions & 0 deletions .404-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ ignore:
- https://www.nic.in/servicecontents/national-cloud # 503
- https://www.gov.uk/government/publications/defence-artificial-intelligence-strategy # Timeout
- https://www.defense.gouv.fr/ema/actualites/voeux-du-chef-detat-major-armees # Timeout
- https://nsf.dev.nato.int/ # Timeout
- https://www.latribune.fr/entreprises-finance/industrie/aeronautique-defense/satellites-europeens-lances-par-spacex-la-terrible-defaite-de-l-europe-spatiale-937632.html # Timeout (protection)
delay: # Perform a pause of X ms at each call matching the url
'https://gitlab.com': 500
'https://gitlab.biterg.io': 1000
2 changes: 1 addition & 1 deletion .github/workflows/markdownchecks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
# Only on main or PR to main
check-404-links:
name: Check for dead links
if: github.ref == 'refs/heads/main' || (github.event_name == 'pull_request' && github.head_ref == 'refs/heads/main')
if: github.ref == 'refs/heads/main' || (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main')
runs-on: ubuntu-20.04
steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

steps:

- name: That's funny
- name: That's a prank
shell: bash
run: |
echo "Updating a published book is not currently natively possible through Amazon APIs :)"
96 changes: 73 additions & 23 deletions .github/workflows/render.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ on:

jobs:

render-book:
name: Render FR book
render-books:
name: Render books
runs-on: ubuntu-20.04
steps:
- name: Extract branch name
Expand Down Expand Up @@ -60,36 +60,51 @@ jobs:
run: |
mkdir -p "$HOME/.local/share/fonts"
cp ./fra/templates/fonts/* "$HOME/.local/share/fonts"
cp ./eng/templates/fonts/* "$HOME/.local/share/fonts"
- name: Render PDF
run: |
sed -i -E "s/date: .+/date: ${{ steps.date.outputs.date }} - ${{ env.BOOK_VERSION }}/g" ./fra/metadata.yml
cd ./fra && make pdf
cd ./fra && make pdf && cd -
cd ./eng && make pdf && cd -
- name: Render HTML
run: |
cd ./fra && make html
cd ./fra && make html && cd -
cd ./eng && make html && cd -
- uses: actions/upload-artifact@v3
with:
name: book-pdf-${{ env.BOOK_VERSION }}
name: book-fr-pdf-${{ env.BOOK_VERSION }}
path: ./fra/build/pdf/book.pdf
retention-days: 1

- uses: actions/upload-artifact@v3
with:
name: book-html-${{ env.BOOK_VERSION }}
name: book-fr-html-${{ env.BOOK_VERSION }}
path: ./fra/build/html/
retention-days: 1

- uses: actions/upload-artifact@v3
with:
name: book-en-pdf-${{ env.BOOK_VERSION }}
path: ./eng/build/pdf/book.pdf
retention-days: 1

- uses: actions/upload-artifact@v3
with:
name: book-en-html-${{ env.BOOK_VERSION }}
path: ./eng/build/html/
retention-days: 1


# Pictures in the book may be referenced at some place in the text.
# Ex: \ref{fig:name} in the text to reference the \label{fig:name} illustration.
#
# When badly referenced, pandoc generates a double questionmarks ("??") in the place
# of the latex tags. This Action checks if there are no "??" in the generated PDF.
check_latex_references:
needs: render-book
check-latex-references:
needs: render-books
name: Check valid latex references
runs-on: ubuntu-22.04
steps:
Expand All @@ -115,29 +130,47 @@ jobs:
exit 1
fi
- name: Download artifact
- name: Download FR artifact
uses: actions/download-artifact@v3
with:
name: book-pdf-${{ env.BOOK_VERSION }}
name: book-fr-pdf-${{ env.BOOK_VERSION }}
path: ./

- name: Get text from book
- name: Get FR text from book
run: |
pdftotext ./book.pdf
- name: Get text from book
- name: Get FR text from book
run: |
if grep -q "??" ./book.pdf; then
echo "The file contains the string '??'"
else
echo "The file does not contain the string '??'"
fi
- name: Download EN artifact
uses: actions/download-artifact@v3
with:
name: book-en-pdf-${{ env.BOOK_VERSION }}
path: ./

- name: Get EN text from book
run: |
pdftotext ./book.pdf
check_version_change:
- name: Get EN text from book
run: |
if grep -q "??" ./book.pdf; then
echo "The file contains the string '??'"
else
echo "The file does not contain the string '??'"
fi
check-version-change:
name: "Check version change"
runs-on: ubuntu-22.04
needs: check_latex_references
needs: check-latex-references
outputs:
version_changed: ${{ steps.check.outputs.version_changed }}
steps:
Expand All @@ -163,9 +196,9 @@ jobs:
fi
deploy_to_gh_pages:
if: needs.check_version_change.outputs.version_changed == 'true' && (github.ref == 'refs/heads/main')
needs: check_version_change
deploy-to-gh-pages:
if: needs.check-version-change.outputs.version_changed == 'true' && (github.ref == 'refs/heads/main')
needs: check-version-change
runs-on: ubuntu-22.04
name: Deploy to GitHub Pages

Expand All @@ -191,14 +224,25 @@ jobs:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: book-html-${{ env.BOOK_VERSION }}
path: output/
name: book-fr-html-${{ env.BOOK_VERSION }}
path: output/fra/

- name: Download artifact
uses: actions/download-artifact@v3
with:
name: book-en-html-${{ env.BOOK_VERSION }}
path: output/eng/

- name: Optimize images
run: |
sudo apt-get install -y jpegoptim optipng
find ./output/ -iname '*.jpg' -exec jpegoptim {} \; -o -iname '*.png' -exec optipng {} \;
- name: Copy default index files
run: |
cp ./index.html ./output/
cp -r ./images ./output/
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
Expand All @@ -209,8 +253,8 @@ jobs:


release:
if: needs.check_version_change.outputs.version_changed == 'true' && (github.ref == 'refs/heads/main')
needs: check_version_change
if: needs.check-version-change.outputs.version_changed == 'true' && (github.ref == 'refs/heads/main')
needs: check-version-change
runs-on: ubuntu-22.04
name: Generate book files for release

Expand All @@ -233,10 +277,16 @@ jobs:
exit 1
fi
- name: Download PDF artifact
- name: Download FR PDF artifact
uses: actions/download-artifact@v3
with:
name: book-fr-pdf-${{ env.BOOK_VERSION }}
path: ./

- name: Download EN PDF artifact
uses: actions/download-artifact@v3
with:
name: book-pdf-${{ env.BOOK_VERSION }}
name: book-en-pdf-${{ env.BOOK_VERSION }}
path: ./

- name: Get version
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
./html/*
!./html/.gitkeep

PREFACE.md

*.$*
git-story_media/

Expand Down
6 changes: 3 additions & 3 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ authors:
- family-names: "BERWICK"
given-names: "Flavien"
orcid: "https://orcid.org/0009-0002-4542-0925"
title: "Le DevOps pour transformer les institutions"
version: 1.0.0
date-released: 2023-10-01
title: "Scaling institutions with DevOps"
version: 1.1.0
date-released: 2023-11-12
url: "https://github.com/flavienbwk/book-devops"
24 changes: 15 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
</a>
</p>

<h4 align="center">:us:</h4>
<h3 align="center"><a href="./eng/README.md" alt="Access the book in english version">Scaling Institutions with DevOps</a><sup></sup></h3>
<p align="center"><i>The pragmatic decision-makers' guide to understanding and acting.</i></p>
<p align="center" style="color: gray; font-size: 0.9em;">Paperback and ebook with foreword</p>

<p align="center">
<img src="./fra/images/cover_a5_source.png" width="128px"/>
<img src="./fra/images/fourthcover_a5_source.png" width="128px"/>
Expand All @@ -19,10 +24,6 @@
<p align="center"><i>Le guide des décideurs pragmatiques pour comprendre et agir.</i></p>
<p align="center" style="color: gray; font-size: 0.9em;">Livre broché et ebook préfacés</p>

<h4 align="center">:uk:</h4>
<h3 align="center">Scaling Institutions with DevOps<sup><a href="#footnote-1">[1]</a></sup></h3>
<p align="center"><i>The pragmatic decision-makers' guide to understanding and acting.</i></p>

<br/>

## What is it ?
Expand All @@ -35,11 +36,15 @@ As a DevOps advocate, I had to make this book GitOps-compliant, this is why it i

Here are the different ways to access this writing :

- [Markdown version (FR)](./fra/README.md)
- [HTML version (FR)](https://book-devops.berwick.fr)
- [Ebook version](https://www.amazon.fr/DevOps-pour-transformer-institutions-pragmatiques-ebook/dp/B0CKHV5QB7) (FR)
- [Paperback book](https://www.amazon.fr/DevOps-pour-transformer-institutions-pragmatiques/dp/B0CKJ6SLV3) (FR)
- [Hardcover book](https://www.amazon.fr/DevOps-pour-transformer-institutions-pragmatiques/dp/B0CKJ651K9) (FR)
| Type | French | English |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
| Web version | [Lire maintenant](https://book-devops.berwick.fr/fra/index.html) | [Read now](https://book-devops.berwick.fr/eng/index.html) |
| Markdown version | [Lire maintenant](./fra/README.md) | [Read now](./fra/README.md) |
| Ebook version | [Amazon](https://www.amazon.fr/dp/B0CKHV5QB7) / [Google Books](https://play.google.com/store/books/details?id=3u_bEAAAQBAJ) | _Soon_ |
| Paperback book | [Amazon](https://www.amazon.fr/dp/B0CKJ6SLV3) | _Soon_ |
| Hardcover book | [Amazon](https://www.amazon.fr/dp/B0CKJ651K9) | _Soon_ |

> The original book was written in French. The English version was reworked to include america-related examples and use cases.
## Summary

Expand All @@ -62,6 +67,7 @@ _That said, this way of writing is very convenient for not being annoyed by comp
It automatically :

<!-- - [Checks spells](https://github.com/check-spelling/check-spelling/blob/main/.github/workflows/spelling.yml) of english-written texts -->

- [Validates Markdown](https://github.com/marketplace/actions/markdown-linting-action) format
- Renders a PDF version on _develop_ and _main_
- [Updates](./.github/workflows/publish.yml) the Amazon physical version book through their API
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.1
1.1.0-alpha
4 changes: 4 additions & 0 deletions eng/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
build/
*.log

PREFACE.md
Loading

0 comments on commit d764056

Please sign in to comment.