diff --git a/.gitea/workflows/main.yaml b/.gitea/workflows/main.yaml index 1fe9eb9e..a22aa3e0 100644 --- a/.gitea/workflows/main.yaml +++ b/.gitea/workflows/main.yaml @@ -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 - - # 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 + 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 - # --- 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: