better workflow, imagemagick is V6 in ubuntu latest

This commit is contained in:
2025-09-14 23:11:14 +02:00
parent 0444067c2d
commit e8d7a390dd

View File

@@ -18,39 +18,31 @@ jobs:
username: ${{ VARS.USER }}
password: ${{ secrets.TOKEN }}
# --- ADDED: Step to generate image assets before the build ---
- name: Generate Static Image Assets
run: |
# Install dependencies required by the scripts
sudo apt-get update && sudo apt-get install -y imagemagick webp
uses: add-actions/run-in-container@v1
with:
image: archlinux:latest
run: |
pacman -Syu --noconfirm imagemagick webp ghostscript
chmod +x ./scripts/*.sh
bash ./scripts/first_page_image.sh
bash ./scripts/generate_webp.sh
# Make scripts executable
chmod +x ./scripts/*.sh
# Run the scripts to generate PNGs from PDFs and create WebP images
echo "Generating PNGs from PDFs..."
bash ./scripts/first_page_image.sh
echo "Generating WebP images..."
bash ./scripts/generate_webp.sh
# --- REPLACED: The following steps are changed from Ruby/Jekyll to Node.js/Next.js ---
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x' # Use a current LTS version of Node.js
node-version: '20.x'
cache: 'npm'
- name: Install Node.js Dependencies
run: npm ci # 'npm ci' is recommended for CI for faster, reliable installs
run: npm ci
- name: Build Next.js App
run: npm run build
# --- END OF REPLACED STEPS ---
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# --- UNCHANGED: This step remains the same as requested ---
- name: Build and push
uses: docker/build-push-action@v5
with: