shalzz / zola-deploy-action

Github action for building a Zola site and deploying to Github Pages
MIT License
234 stars 91 forks source link

Move `cd $BUILD_DIR` up to accomodate repo checkouts in subdirectory. #61

Closed azriel91 closed 1 year ago

azriel91 commented 1 year ago

Follow up from #60, this allows a github action workflow that clones a repository to subdir to work.

I've also tested the case where a repository is cloned to the current directory, that running git submodule update --init --recursive in a subdirectory works:

# /tmp/abc2 is the repository
# /tmp/abc2/themes/juice is the submodule
cd /tmp/abc2/subdir
git submodule update --init --recursive

output:

Submodule 'themes/juice' (https://github.com/huhu/juice) registered for path '../themes/juice'
Cloning into '/tmp/abc2/themes/juice'...
Submodule path '../themes/juice': checked out '7466e194e139e00e5e002cd943ec52373eb3d1d0'