Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot overwrite directory with non-directory #155

Closed
c4dr01d opened this issue Sep 29, 2021 · 2 comments
Closed

Error: Cannot overwrite directory with non-directory #155

c4dr01d opened this issue Sep 29, 2021 · 2 comments

Comments

@c4dr01d
Copy link

c4dr01d commented Sep 29, 2021

Hi, first all, thanks for this action to make me be more focused on writing posts, not for spend so much time to maintaining the deploy scripts

Behaviour

Pushed code, actions build exit successfully but report: Error: Cannot overwrite directory '/tmp/xxx' with non-directory '/home/runner/work/xxx'

Steps to reproduce this issue

  1. Making some changes
  2. Push to repository
  3. GitHub Actions building...

Expected behaviour

The gh-pages branch should contain builded site

Actual behaviour

GitHub actions report the error: Error: Cannot override directory '/tmp/xxx' with non-directory '/home/runner/work/xxx'

Configuration

# paste your YAML workflow file here and remove sensitive data
- uses: crazy-max/ghaction-github-pages@v2
  if: success()
  with:
    verbose: true
    build_dir: site
    target_branch: gh-pages
    keep_history: true
  env:
    GITHUB_TOKEN: ${{ secrets.TOKEN }}

Logs

2021-09-29T03:09:11.9604280Z ##[group]Run crazy-max/ghaction-github-pages@v2
2021-09-29T03:09:11.9604921Z with:
2021-09-29T03:09:11.9605294Z   verbose: true
2021-09-29T03:09:11.9605703Z   build_dir: site
2021-09-29T03:09:11.9606157Z   target_branch: gh-pages
2021-09-29T03:09:11.9606614Z   keep_history: true
2021-09-29T03:09:11.9607057Z   domain: github.com
2021-09-29T03:09:11.9607541Z   allow_empty_commit: true
2021-09-29T03:09:11.9607966Z   jekyll: true
2021-09-29T03:09:11.9608361Z   dry_run: false
2021-09-29T03:09:11.9608718Z env:
2021-09-29T03:09:11.9610179Z   GITHUB_TOKEN: ***
2021-09-29T03:09:11.9610623Z ##[endgroup]
2021-09-29T03:09:12.3716308Z ##[group]Cloning c4dr01d/c4dr01d.github.io
2021-09-29T03:09:12.3750901Z [command]/usr/bin/git clone --quiet --branch gh-pages --depth 1 ***github.com/c4dr01d/c4dr01d.github.io.git .
2021-09-29T03:09:12.8148526Z ##[endgroup]
2021-09-29T03:09:12.8157710Z ##[group]Copying /home/runner/work/c4dr01d.github.io/c4dr01d.github.io/site to /tmp/github-pages-3IjFT9
2021-09-29T03:09:12.8180535Z ##[error]Error: Cannot overwrite directory '/tmp/github-pages-3IjFT9' with non-directory '/home/runner/work/c4dr01d.github.io/c4dr01d.github.io/site'.
2021-09-29T03:09:12.8194358Z 0 file(s) copied.
2021-09-29T03:09:12.8195704Z ##[endgroup]
2021-09-29T03:09:12.8267307Z No changes to commit
@wolverian
Copy link

This happens at least when the build_dir is a symbolic link.

@crazy-max
Copy link
Owner

Should be fixed with follow_symlinks input: #161

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants