actions-gh-pages
actions-gh-pages copied to clipboard
Not delete .git directory when publish_dir is GITHUB_WORKSPACE
I've been trouble shooting this problem forever. I was getting errors that my directory was not a git directory, i.e. there was no .git subdirectory. I tracked it down to this action. Here's what I have in my yaml:
- run: ls -la
- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: .
- run: ls -la
And I can see that before running this action, I have a .git subdirectory, and after running it I don't. So this explains my mystery problem but I don't understand what to do about it. I tried publish_dir: ./public like you have in one of your examples but that doesn't work either in that it doesn't see any changed files.
Only when we set publish_dir: ., this action deletes .git directory. This is my cornerācutting and will be improved on the next release.