Skip to content

Commit ea34764

Browse files
committed
Merge branch 'main' of github.com:flavienbwk/book-devops
2 parents 10c3071 + b6b9605 commit ea34764

File tree

275 files changed

+5659
-573
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

275 files changed

+5659
-573
lines changed

.404-links.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ ignore:
3030
- https://www.nic.in/servicecontents/national-cloud # 503
3131
- https://www.gov.uk/government/publications/defence-artificial-intelligence-strategy # Timeout
3232
- https://www.defense.gouv.fr/ema/actualites/voeux-du-chef-detat-major-armees # Timeout
33+
- https://nsf.dev.nato.int/ # Timeout
34+
- 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)
35+
- https://suntzufrance.fr/sun-tzu-a-t-il-invente-les-cas-non-conformes/ # Timeout (protection)
3336
delay: # Perform a pause of X ms at each call matching the url
3437
'https://gitlab.com': 500
3538
'https://gitlab.biterg.io': 1000

.github/workflows/deadlinks.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Markdown checks
2+
3+
on:
4+
push:
5+
paths:
6+
- 'fra/README.md'
7+
- 'eng/README.md'
8+
pull_request:
9+
paths:
10+
- 'fra/README.md'
11+
- 'eng/README.md'
12+
13+
jobs:
14+
15+
# Only on main or PR to main
16+
check-404-links:
17+
name: Check for dead links
18+
if: github.ref == 'refs/heads/main' || (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main')
19+
runs-on: ubuntu-20.04
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v3
23+
- name: 404 Links
24+
uses: atalent-labs/404-links@3.1.4

.github/workflows/markdownchecks.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,6 @@ on:
66

77
jobs:
88

9-
# Only on main or PR to main
10-
check-404-links:
11-
name: Check for dead links
12-
if: github.ref == 'refs/heads/main' || (github.event_name == 'pull_request' && github.head_ref == 'refs/heads/main')
13-
runs-on: ubuntu-20.04
14-
steps:
15-
- name: Checkout
16-
uses: actions/checkout@v3
17-
- name: 404 Links
18-
uses: atalent-labs/404-links@3.1.4
19-
209
markdownlint:
2110
name: Markdownlint
2211
runs-on: ubuntu-22.04

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
steps:
1414

15-
- name: That's funny
15+
- name: That's a prank
1616
shell: bash
1717
run: |
1818
echo "Updating a published book is not currently natively possible through Amazon APIs :)"

.github/workflows/render.yml

Lines changed: 82 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ on:
1010

1111
jobs:
1212

13-
render-book:
14-
name: Render FR book
13+
render-books:
14+
name: Render books
1515
runs-on: ubuntu-20.04
1616
steps:
1717
- name: Extract branch name
@@ -60,36 +60,54 @@ jobs:
6060
run: |
6161
mkdir -p "$HOME/.local/share/fonts"
6262
cp ./fra/templates/fonts/* "$HOME/.local/share/fonts"
63+
cp ./eng/templates/fonts/* "$HOME/.local/share/fonts"
6364
6465
- name: Render PDF
6566
run: |
6667
sed -i -E "s/date: .+/date: ${{ steps.date.outputs.date }} - ${{ env.BOOK_VERSION }}/g" ./fra/metadata.yml
67-
cd ./fra && make pdf
68+
sed -i -E "s/date: .+/date: ${{ steps.date.outputs.date }} - ${{ env.BOOK_VERSION }}/g" ./eng/metadata.yml
69+
cd ./fra && make pdf && cd -
70+
mv ./fra/build/pdf/book.pdf ./fra/build/pdf/book-fra.pdf
71+
cd ./eng && make pdf && cd -
72+
mv ./eng/build/pdf/book.pdf ./eng/build/pdf/book-eng.pdf
6873
6974
- name: Render HTML
7075
run: |
71-
cd ./fra && make html
76+
cd ./fra && make html && cd -
77+
cd ./eng && make html && cd -
7278
7379
- uses: actions/upload-artifact@v3
7480
with:
75-
name: book-pdf-${{ env.BOOK_VERSION }}
76-
path: ./fra/build/pdf/book.pdf
81+
name: book-fra-pdf-${{ env.BOOK_VERSION }}
82+
path: ./fra/build/pdf/book-fra.pdf
7783
retention-days: 1
7884

7985
- uses: actions/upload-artifact@v3
8086
with:
81-
name: book-html-${{ env.BOOK_VERSION }}
87+
name: book-fra-html-${{ env.BOOK_VERSION }}
8288
path: ./fra/build/html/
8389
retention-days: 1
8490

91+
- uses: actions/upload-artifact@v3
92+
with:
93+
name: book-eng-pdf-${{ env.BOOK_VERSION }}
94+
path: ./eng/build/pdf/book-eng.pdf
95+
retention-days: 1
96+
97+
- uses: actions/upload-artifact@v3
98+
with:
99+
name: book-eng-html-${{ env.BOOK_VERSION }}
100+
path: ./eng/build/html/
101+
retention-days: 1
102+
85103

86104
# Pictures in the book may be referenced at some place in the text.
87105
# Ex: \ref{fig:name} in the text to reference the \label{fig:name} illustration.
88106
#
89107
# When badly referenced, pandoc generates a double questionmarks ("??") in the place
90108
# of the latex tags. This Action checks if there are no "??" in the generated PDF.
91-
check_latex_references:
92-
needs: render-book
109+
check-latex-references:
110+
needs: render-books
93111
name: Check valid latex references
94112
runs-on: ubuntu-22.04
95113
steps:
@@ -115,29 +133,47 @@ jobs:
115133
exit 1
116134
fi
117135
118-
- name: Download artifact
136+
- name: Download FR artifact
119137
uses: actions/download-artifact@v3
120138
with:
121-
name: book-pdf-${{ env.BOOK_VERSION }}
139+
name: book-fra-pdf-${{ env.BOOK_VERSION }}
122140
path: ./
123141

124-
- name: Get text from book
142+
- name: Get FR text from book
125143
run: |
126-
pdftotext ./book.pdf
144+
pdftotext ./book-fra.pdf
127145
128-
- name: Get text from book
146+
- name: Get FR text from book
129147
run: |
130-
if grep -q "??" ./book.pdf; then
148+
if grep -q "??" ./book-fra.pdf; then
131149
echo "The file contains the string '??'"
132150
else
133151
echo "The file does not contain the string '??'"
134152
fi
135153
154+
- name: Download EN artifact
155+
uses: actions/download-artifact@v3
156+
with:
157+
name: book-eng-pdf-${{ env.BOOK_VERSION }}
158+
path: ./
159+
160+
- name: Get EN text from book
161+
run: |
162+
pdftotext ./book-eng.pdf
136163
137-
check_version_change:
164+
- name: Get EN text from book
165+
run: |
166+
if grep -q "??" ./book-eng.pdf; then
167+
echo "The file contains the string '??'"
168+
else
169+
echo "The file does not contain the string '??'"
170+
fi
171+
172+
173+
check-version-change:
138174
name: "Check version change"
139175
runs-on: ubuntu-22.04
140-
needs: check_latex_references
176+
needs: check-latex-references
141177
outputs:
142178
version_changed: ${{ steps.check.outputs.version_changed }}
143179
steps:
@@ -163,9 +199,9 @@ jobs:
163199
fi
164200
165201
166-
deploy_to_gh_pages:
167-
if: needs.check_version_change.outputs.version_changed == 'true' && (github.ref == 'refs/heads/main')
168-
needs: check_version_change
202+
deploy-to-gh-pages:
203+
if: needs.check-version-change.outputs.version_changed == 'true' && (github.ref == 'refs/heads/main')
204+
needs: check-version-change
169205
runs-on: ubuntu-22.04
170206
name: Deploy to GitHub Pages
171207

@@ -191,14 +227,25 @@ jobs:
191227
- name: Download artifact
192228
uses: actions/download-artifact@v3
193229
with:
194-
name: book-html-${{ env.BOOK_VERSION }}
195-
path: output/
230+
name: book-fra-html-${{ env.BOOK_VERSION }}
231+
path: output/fra/
232+
233+
- name: Download artifact
234+
uses: actions/download-artifact@v3
235+
with:
236+
name: book-eng-html-${{ env.BOOK_VERSION }}
237+
path: output/eng/
196238

197239
- name: Optimize images
198240
run: |
199241
sudo apt-get install -y jpegoptim optipng
200242
find ./output/ -iname '*.jpg' -exec jpegoptim {} \; -o -iname '*.png' -exec optipng {} \;
201243
244+
- name: Copy default index files
245+
run: |
246+
cp ./index.html ./output/
247+
cp -r ./images ./output/
248+
202249
- name: Deploy to GitHub Pages
203250
uses: peaceiris/actions-gh-pages@v3
204251
with:
@@ -209,8 +256,8 @@ jobs:
209256

210257

211258
release:
212-
if: needs.check_version_change.outputs.version_changed == 'true' && (github.ref == 'refs/heads/main')
213-
needs: check_version_change
259+
if: needs.check-version-change.outputs.version_changed == 'true' && (github.ref == 'refs/heads/main')
260+
needs: check-version-change
214261
runs-on: ubuntu-22.04
215262
name: Generate book files for release
216263

@@ -233,18 +280,24 @@ jobs:
233280
exit 1
234281
fi
235282
236-
- name: Download PDF artifact
283+
- name: Download FR PDF artifact
284+
uses: actions/download-artifact@v3
285+
with:
286+
name: book-fra-pdf-${{ env.BOOK_VERSION }}
287+
path: ./
288+
289+
- name: Download EN PDF artifact
237290
uses: actions/download-artifact@v3
238291
with:
239-
name: book-pdf-${{ env.BOOK_VERSION }}
292+
name: book-eng-pdf-${{ env.BOOK_VERSION }}
240293
path: ./
241294

242295
- name: Get version
243296
id: get-version
244297
run: |
245298
VERSION_CONTENT=$(cat VERSION)
246299
echo "::set-output name=version::$VERSION_CONTENT"
247-
if [[ $VERSION_CONTENT == *"-alpha"* ]]; then
300+
if [[ $VERSION_CONTENT == *"-alpha"* ]] || [[ $VERSION_CONTENT == *"-beta"* ]] || [[ $VERSION_CONTENT == *"-rc"* ]]; then
248301
echo "::set-output name=prerelease::true"
249302
else
250303
echo "::set-output name=prerelease::false"
@@ -256,7 +309,8 @@ jobs:
256309
name: ${{ env.BOOK_VERSION }}
257310
tag_name: ${{ env.BOOK_VERSION }}
258311
files: |
259-
./book.pdf
312+
./book-fra.pdf
313+
./book-eng.pdf
260314
prerelease: ${{ steps.get-version.outputs.prerelease }}
261315
env:
262316
GITHUB_TOKEN: ${{ github.token }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
./html/*
33
!./html/.gitkeep
44

5+
PREFACE.md
6+
57
*.$*
68
git-story_media/
79

CITATION.cff

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ authors:
44
- family-names: "BERWICK"
55
given-names: "Flavien"
66
orcid: "https://orcid.org/0009-0002-4542-0925"
7-
title: "Le DevOps pour transformer les institutions"
8-
version: 1.0.0
9-
date-released: 2023-10-01
7+
title: "Scaling institutions with DevOps"
8+
version: 1.1.0
9+
date-released: 2023-11-12
1010
url: "https://github.com/flavienbwk/book-devops"

README.md

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,25 @@
99
</a>
1010
</p>
1111

12+
<h4 align="center">:us:</h4>
13+
<h3 align="center"><a href="./eng/README.md" alt="Access the book in english version">Scaling Institutions with DevOps</a><sup></sup></h3>
14+
<p align="center"><i>The pragmatic decision-makers' guide to understanding and acting.</i></p>
15+
<p align="center" style="color: gray; font-size: 0.9em;">Paperback and ebook with foreword</p>
16+
1217
<p align="center">
13-
<img src="./fra/images/cover_a5_source.png" width="128px"/>
14-
<img src="./fra/images/fourthcover_a5_source.png" width="128px"/>
18+
<img src="./eng/images/cover_a5_source_thumb.png" width="128px"/>
19+
<img src="./eng/images/fourthcover_a5_source_thumb.png" width="128px"/>
1520
</p>
1621

1722
<h4 align="center">:fr:</h4>
1823
<h3 align="center"><a href="./fra/README.md" alt="Accéder au livre en version française">Le DevOps pour transformer les institutions</a></h3>
1924
<p align="center"><i>Le guide des décideurs pragmatiques pour comprendre et agir.</i></p>
2025
<p align="center" style="color: gray; font-size: 0.9em;">Livre broché et ebook préfacés</p>
2126

22-
<h4 align="center">:uk:</h4>
23-
<h3 align="center">Scaling Institutions with DevOps<sup><a href="#footnote-1">[1]</a></sup></h3>
24-
<p align="center"><i>The pragmatic decision-makers' guide to understanding and acting.</i></p>
27+
<p align="center">
28+
<img src="./fra/images/cover_a5_source_thumb.png" width="128px"/>
29+
<img src="./fra/images/fourthcover_a5_source_thumb.png" width="128px"/>
30+
</p>
2531

2632
<br/>
2733

@@ -35,11 +41,15 @@ As a DevOps advocate, I had to make this book GitOps-compliant, this is why it i
3541

3642
Here are the different ways to access this writing :
3743

38-
- [Markdown version (FR)](./fra/README.md)
39-
- [HTML version (FR)](https://book-devops.berwick.fr)
40-
- [Ebook version](https://www.amazon.fr/DevOps-pour-transformer-institutions-pragmatiques-ebook/dp/B0CKHV5QB7) (FR)
41-
- [Paperback book](https://www.amazon.fr/DevOps-pour-transformer-institutions-pragmatiques/dp/B0CKJ6SLV3) (FR)
42-
- [Hardcover book](https://www.amazon.fr/DevOps-pour-transformer-institutions-pragmatiques/dp/B0CKJ651K9) (FR)
44+
| Type | French | English |
45+
| ---------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
46+
| Web version | [Lire maintenant](https://book-devops.berwick.fr/fra/index.html) | [Read now](https://book-devops.berwick.fr/eng/index.html) |
47+
| Markdown version | [Lire maintenant](./fra/README.md) | [Read now](./fra/README.md) |
48+
| Ebook version | [Amazon](https://www.amazon.fr/dp/B0CKHV5QB7) / [Google Books](https://play.google.com/store/books/details?id=3u_bEAAAQBAJ) | _Soon_ |
49+
| Paperback book | [Amazon](https://www.amazon.fr/dp/B0CKJ6SLV3) | _Soon_ |
50+
| Hardcover book | [Amazon](https://www.amazon.fr/dp/B0CKJ651K9) | _Soon_ |
51+
52+
> The original book was written in French. The English version was reworked to include america-related examples and use cases.
4353
4454
## Summary
4555

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

6474
<!-- - [Checks spells](https://github.com/check-spelling/check-spelling/blob/main/.github/workflows/spelling.yml) of english-written texts -->
75+
6576
- [Validates Markdown](https://github.com/marketplace/actions/markdown-linting-action) format
6677
- Renders a PDF version on _develop_ and _main_
6778
- [Updates](./.github/workflows/publish.yml) the Amazon physical version book through their API

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.1
1+
1.1.0-beta-6

eng/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
build/
2+
*.log
3+
4+
PREFACE.md

0 commit comments

Comments
 (0)