shalzz / zola-deploy-action

Github action for building a Zola site and deploying to Github Pages

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build breaks with co-located assets

pfesenmeier opened this issue · comments

Hello, I have a Zola shortcode
templates/shortcodes/resize_image.html

And a post using it to render several co-located photos:

content/hack-a-thon-2021/
                     - index.html
                     - photo1.jpeg
                     - photo2.jpeg

Build and serve works fine locally. However, during the GHA, it fails with this error:

 Error: Failed to render content of /github/workspace/content/hack-a-thon-2021/index.md
Reason: Failed to render resize_image shortcode
Reason: Failed to render 'shortcodes/resize_image.html'
Reason: Function call 'resize_image' failed
Reason: `resize_image`: Cannot find path: content/hack-a-thon-2021/rpi-overhead.jpeg

my action is copy-pasted from zola site:

# On every push this script is executed
on: push
name: Build and deploy GH Pages
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: checkout
        uses: actions/checkout@v2
      - name: build_and_deploy
        uses: shalzz/zola-deploy-action@v0.13.0
        env:
          # Target branch
          PAGES_BRANCH: gh-pages
          # Provide personal access token
          TOKEN: ${{ secrets.TOKEN }}

Would like to say I'm really enjoying using this github action!

The repo is here

According to this uses: shalzz/zola-deploy-action@v0.13.0 you are pinning to a specific version of this action and in turn a version of zola i.e. v0.13..0.
If that is what's intended build and test locally with the same version of zola.
If not then please read through the complete documentation of this action and as well as the general documentation of github actions and tweak the workflow according to your needs.

Ah yes! I used 14 locally and was using 13 in the action.

I've opened up a PR to update the docs with the latest version of your github action.