mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2025-12-05 19:17:28 -06:00
fix: correct working-directory paths for compression steps in baremetal workflow [skip ci]
All compression steps (PDF and EPUB, both Linux and Windows) now use the correct working-directory path by prepending BOOK_ROOT to the output_dir. This fixes the 'No such file or directory' errors when trying to compress build artifacts. The output_dir from the build step is relative (e.g., '_build/epub'), but needs to be accessed from BOOK_ROOT (e.g., 'book/_build/epub') after the repository restructuring.
This commit is contained in:
8
.github/workflows/book-build-baremetal.yml
vendored
8
.github/workflows/book-build-baremetal.yml
vendored
@@ -1039,7 +1039,7 @@ jobs:
|
||||
|
||||
- name: 📉 Compress PDF (Linux)
|
||||
if: matrix.enabled && matrix.format == 'PDF' && runner.os == 'Linux'
|
||||
working-directory: ${{ steps.build.outputs.output_dir }}
|
||||
working-directory: ${{ vars.BOOK_ROOT }}/${{ steps.build.outputs.output_dir }}
|
||||
run: |
|
||||
if [ -f "Machine-Learning-Systems.pdf" ]; then
|
||||
echo "📉 Compressing PDF with professional compression tool..."
|
||||
@@ -1057,7 +1057,7 @@ jobs:
|
||||
- name: 📉 Compress PDF (Windows)
|
||||
if: matrix.enabled && matrix.format == 'PDF' && runner.os == 'Windows'
|
||||
shell: pwsh
|
||||
working-directory: ${{ steps.build.outputs.output_dir }}
|
||||
working-directory: ${{ vars.BOOK_ROOT }}/${{ steps.build.outputs.output_dir }}
|
||||
run: |
|
||||
# Set UTF-8 encoding for proper emoji display
|
||||
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
||||
@@ -1085,7 +1085,7 @@ jobs:
|
||||
|
||||
- name: 📚 Compress EPUB (Linux)
|
||||
if: matrix.enabled && matrix.format == 'EPUB' && runner.os == 'Linux'
|
||||
working-directory: ${{ steps.build.outputs.output_dir }}
|
||||
working-directory: ${{ vars.BOOK_ROOT }}/${{ steps.build.outputs.output_dir }}
|
||||
run: |
|
||||
if [ -f "Machine-Learning-Systems.epub" ]; then
|
||||
echo "📚 Compressing EPUB with optimized compression tool..."
|
||||
@@ -1119,7 +1119,7 @@ jobs:
|
||||
- name: 📚 Compress EPUB (Windows)
|
||||
if: matrix.enabled && matrix.format == 'EPUB' && runner.os == 'Windows'
|
||||
shell: pwsh
|
||||
working-directory: ${{ steps.build.outputs.output_dir }}
|
||||
working-directory: ${{ vars.BOOK_ROOT }}/${{ steps.build.outputs.output_dir }}
|
||||
run: |
|
||||
# Set UTF-8 encoding for proper emoji display
|
||||
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
||||
|
||||
Reference in New Issue
Block a user