question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Action failed with "ENOENT: no such file or directory with force_orphan

See original GitHub issue

Describe the bug

I’m trying to deploy the repo root but it fails:

Switched to a new branch 'gh-pages'
  [INFO] prepare publishing assets
  [INFO] delete .git
  [INFO] copy /home/runner/work/chip8/chip8/ to /home/runner/actions_github_pages_1602884889152
  [INFO] delete excluded assets
  [INFO] delete /home/runner/actions_github_pages_1602884889152/.github
  Error: Action failed with "ENOENT: no such file or directory, realpath '/home/runner/actions_github_pages_1602884889152/.github/workflows'"

To Reproduce

https://github.com/letmaik/chip8/runs/1266688809?check_suite_focus=true

Expected behavior

Should not fail with default settings.

Your YAML file

https://github.com/letmaik/chip8/blob/master/.github/workflows/gh-pages.yml

Additional context

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ddeboercommented, Oct 20, 2020

Unfortunately that gives the same error: https://github.com/netwerk-digitaal-erfgoed/requirements-template/runs/1279644649?check_suite_focus=true#step:5:53

To be clear: the workflow ‘succeeds’ (is green), but because of the above error the GitHub Pages output is not updated.

I’m guessing this has to do with publish_dir: ./, because the root dir contains the .git dir while subdirs (public/ for instance) wouldn’t.

1reaction
ddeboercommented, Oct 20, 2020

It also breaks when force_orphan is not set to true (and publish_dir: ./): https://github.com/netwerk-digitaal-erfgoed/requirements-template/runs/1279392636?check_suite_focus=true#step:5:21, with:

2020-10-20T06:44:59.6100416Z ##[group]Prepare publishing assets
2020-10-20T06:44:59.6103492Z [INFO] ForceOrphan: false
2020-10-20T06:44:59.6142943Z [command]/usr/bin/git clone --depth=1 --single-branch --branch gh-pages ***github.com/netwerk-digitaal-erfgoed/requirements-template.git /home/runner/actions_github_pages_1603176299609
2020-10-20T06:44:59.6207552Z Cloning into '/home/runner/actions_github_pages_1603176299609'...
2020-10-20T06:44:59.9855923Z [INFO] clean up /home/runner/actions_github_pages_1603176299609
2020-10-20T06:44:59.9865863Z [INFO] chdir /home/runner/actions_github_pages_1603176299609
2020-10-20T06:44:59.9869642Z [command]/usr/bin/git rm -r --ignore-unmatch *
2020-10-20T06:44:59.9912407Z rm '.nojekyll'
2020-10-20T06:44:59.9939315Z rm 'Makefile'
2020-10-20T06:44:59.9940532Z rm 'README.md'
2020-10-20T06:44:59.9941532Z rm 'index.bs'
2020-10-20T06:44:59.9942434Z rm 'index.html'
2020-10-20T06:44:59.9943518Z [INFO] chdir /home/runner/actions_github_pages_1603176299609
2020-10-20T06:44:59.9944363Z [INFO] prepare publishing assets
2020-10-20T06:44:59.9945123Z [INFO] delete .git
2020-10-20T06:44:59.9947984Z [INFO] copy /home/runner/work/requirements-template/requirements-template/ to /home/runner/actions_github_pages_1603176299609
2020-10-20T06:45:00.0091480Z cp: copyFileSync: could not write to dest file (code=EACCES):/home/runner/actions_github_pages_1603176299609/.git/objects/d6/e50d743451b0474887a69d7181d4aebc7ca1fd
2020-10-20T06:45:00.0100232Z cp: cannot create directory '/home/runner/actions_github_pages_1603176299609': No such file or directory
Read more comments on GitHub >

github_iconTop Results From Across the Web

npm install in GitHub Action fails with "ENOENT: no such file ...
At long wait, I found the solution here: Install an npm module from a private GitHub repository using GitHub Actions
Read more >
nektos/act - Gitter
Got ::error::Unable to locate executable file: docker with aws-actions-amazon-ecr-login@v1 action. It's halfway through the workflow, and docker is used ~10 ...
Read more >
Cannot deploy Azure app service via GitHub Actions after ...
Error : ENOENT: no such file or directory, open '/home/site/wwwroot/Azure.Storage.Blobs.dll' An error has occurred during web site deployment ...
Read more >
GitHub action fails with No such file or directory
I am trying a very basic GitHub CI actions with my PlatformIO project. I am using almost the official Workflow provided by the...
Read more >
github actions: debugging 'no such file or directory'
Unfortunately, every time the action fired it threw an error. /home/runner/work/_temp/eb8554b7-c24c-42a2-b406-ad1796ed6740.sh: line 1: /home/ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found