From 68ea2b61a6c78f3fece2d2593a56f2123f0fe2fd Mon Sep 17 00:00:00 2001 From: Antoine Le Morvan Date: Thu, 8 Feb 2024 10:10:16 +0100 Subject: [PATCH 1/6] Add a script that build only source (EN) books --- build_pdf/build_en.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 build_pdf/build_en.sh diff --git a/build_pdf/build_en.sh b/build_pdf/build_en.sh new file mode 100644 index 0000000000..b0337d0277 --- /dev/null +++ b/build_pdf/build_en.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" +cd $SCRIPTPATH + +for book in admin_book ansible_book bash_book middlewares sed_awk_grep nvchad_book + +do + for config_file in $(ls ${SCRIPTPATH}/${book}/en.yml) + do + echo "Building $config_file" + echo "---------------------" + VERSION=$(date +%Y/%m/%d) mkdocs build -q -f $config_file -d ${SCRIPTPATH}/site/ + echo "" + done +done +rm -Rf ${SCRIPTPATH}/site/ From e16d34b32bfca4a2cd470c5b97b031e70af8884e Mon Sep 17 00:00:00 2001 From: Antoine Le Morvan Date: Thu, 8 Feb 2024 10:11:33 +0100 Subject: [PATCH 2/6] Suppress specific path to upload (debug) --- .github/workflows/generate-pdfs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate-pdfs.yml b/.github/workflows/generate-pdfs.yml index 39b1136abc..67335c22e1 100644 --- a/.github/workflows/generate-pdfs.yml +++ b/.github/workflows/generate-pdfs.yml @@ -38,7 +38,7 @@ jobs: python -m pip install -r ${PWD}/build_pdf/requirements.txt - name: Build all - run: ${PWD}/build_pdf/build_all.sh + run: ${PWD}/build_pdf/build_en.sh - name: Setup Pages uses: actions/configure-pages@v4 @@ -46,7 +46,7 @@ jobs: - name: Upload GitHub Pages artifact uses: actions/upload-pages-artifact@v3 with: - path: './build_pdf/pdf/*' + path: '.' deploy: runs-on: ubuntu-latest From ae9194d0d52e4828ff8189a2fbaaa0c12e81b05e Mon Sep 17 00:00:00 2001 From: Antoine Le Morvan Date: Thu, 8 Feb 2024 10:15:46 +0100 Subject: [PATCH 3/6] Launch build with bash --- .github/workflows/generate-pdfs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate-pdfs.yml b/.github/workflows/generate-pdfs.yml index 67335c22e1..e7f350bc5b 100644 --- a/.github/workflows/generate-pdfs.yml +++ b/.github/workflows/generate-pdfs.yml @@ -38,7 +38,7 @@ jobs: python -m pip install -r ${PWD}/build_pdf/requirements.txt - name: Build all - run: ${PWD}/build_pdf/build_en.sh + run: bash ${PWD}/build_pdf/build_en.sh - name: Setup Pages uses: actions/configure-pages@v4 From 0af2f1ec342b6354b3cb03b12bac3b1124dcd3ce Mon Sep 17 00:00:00 2001 From: Antoine Le Morvan Date: Thu, 8 Feb 2024 11:09:19 +0100 Subject: [PATCH 4/6] update nodejs v20 + subdirectory --- .github/workflows/generate-pdfs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate-pdfs.yml b/.github/workflows/generate-pdfs.yml index e7f350bc5b..496437eb49 100644 --- a/.github/workflows/generate-pdfs.yml +++ b/.github/workflows/generate-pdfs.yml @@ -28,7 +28,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: "3.9" @@ -46,7 +46,7 @@ jobs: - name: Upload GitHub Pages artifact uses: actions/upload-pages-artifact@v3 with: - path: '.' + path: './build_pdf/' deploy: runs-on: ubuntu-latest From 67c9279afa08ecdbca54b2d4018ae826dddd89d5 Mon Sep 17 00:00:00 2001 From: Antoine Le Morvan Date: Thu, 8 Feb 2024 11:27:11 +0100 Subject: [PATCH 5/6] pages: subdir --- .github/workflows/generate-pdfs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate-pdfs.yml b/.github/workflows/generate-pdfs.yml index 496437eb49..b4947071fe 100644 --- a/.github/workflows/generate-pdfs.yml +++ b/.github/workflows/generate-pdfs.yml @@ -46,7 +46,7 @@ jobs: - name: Upload GitHub Pages artifact uses: actions/upload-pages-artifact@v3 with: - path: './build_pdf/' + path: './build_pdf/pdf/' deploy: runs-on: ubuntu-latest From a10952091d0136429a22afaea42689adfae9b05c Mon Sep 17 00:00:00 2001 From: Antoine Le Morvan Date: Thu, 8 Feb 2024 11:56:56 +0100 Subject: [PATCH 6/6] feat: generate all pdf to pages --- .github/workflows/generate-pdfs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate-pdfs.yml b/.github/workflows/generate-pdfs.yml index b4947071fe..8e4e0d0efa 100644 --- a/.github/workflows/generate-pdfs.yml +++ b/.github/workflows/generate-pdfs.yml @@ -38,7 +38,7 @@ jobs: python -m pip install -r ${PWD}/build_pdf/requirements.txt - name: Build all - run: bash ${PWD}/build_pdf/build_en.sh + run: bash ${PWD}/build_pdf/build_all.sh - name: Setup Pages uses: actions/configure-pages@v4