-
-
Notifications
You must be signed in to change notification settings - Fork 354
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 "There is nothing to commit. Exiting early" #1019
Comments
Thanks for the report. I'll do some research on this tomorrow morning and get back to you once I have some details to share. |
I spent a couple of hours looking into this today and the deeper I get on this issue the more confused I become. From what I can tell the name: veripy
on:
push:
branches:
- main
jobs:
covgate:
name: Unit tests with coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: View files
if: always()
run: |
mkdir htmlcov
cd htmlcov
touch example.txt
- name: Coverage report on GitHub Pages
if: success() || failure()
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: htmlcov
target-folder: veripy/cov/${{ github.run_id }}/
repository-name: JamesIves/special-octo-bassoon
branch: master
token: ${{ secrets.PAT }}
git-config-name: ${{ github.event.pusher.name }}
git-config-email: ${{ github.event.pusher.email }}
commit-message: Artifacts from https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
single-commit: false
silent: false Is it possible that veripy is adding these generated directories in a way that git is unable to read them and their contents? Either via a globally set git ignore configuration, or perhaps the folder permissions are not adequate enough that git has read access to them? The deployment step is reading/seeing the files, but git for whatever reason is not so it doesn't finish. I've tried to reproduce this as much as possible and I keep coming back to something within veripy being the culprit but it's pretty difficult to pinpoint what exactly. I've tried using multiple different static site generators under the exact same conditions and in each scenario the deployment seems to pass 😞 |
Thank you for your investigation, I highly appreciate your help. You are absolutely right. Indeed, there was a recent change in the tool that generates the Hence, I changed Additionally I checked the case when |
Excellent. Looks like the source of the error now is that you need to generate a personal access token to push to a difference repository. You can see an example of me using that above with the token input, and there's documentation within the readme that shows you how to generate one. 👍 I'm going to close this issue as it looks to be resolved! |
Thank you very much for your hints, with PAT it works! 🎉 |
I just started using this action and stumbled upon the same problem here. My build creates all files in a "dist" folder, which is listed in the .gitignore file, because usually I don't want to add anything from there. Is there a with to force git adding the files? Should I delete the .gitignore file during the build? Or is there any other workaround? |
I switched over from Travis CI to GitHub Actions and deleting the old branch created by Travis CI did the trick for me. |
I've hit the same snag as @Scarabol - I also have a gitignored |
the same is happening to me with docs/ folder. If I gitignore it, the build does not start as the action finds "nothing to commit" |
Describe the bug
With GitHub workflows I am trying to push
htmlcov
folder [generated for a project inhttps://github.com/nsavelyeva/snippman
on an earlier workflow step] into a non-existing directory of amaster
branch in another repositoryhttps://github.com/nsavelyeva/nsavelyeva.github.io
[that is supposed to keep workflow artifacts as github pages].According to the documentation, this is achievable and all parameters that I provide seem to be correct.
Reproduction Steps
htmlcov
folder containing HTML report of code coverageJamesIves/github-pages-deploy-action@v4.2.2
to push folder to a non-existing directory of another repository that serves as github pages - in my case to https://github.com/nsavelyeva/nsavelyeva.github.ioActual result: As a result, no files were detected and GitHub Action exited with
There is nothing to commit. Exiting early…
Expected result: the folder
htmlcov
is successfully pushed toveripy/cov/${{ github.run_id }}/
folder ofnsavelyeva/nsavelyeva.github.io
repository.Logs
Workflow
Workflow links:
Additional Comments
clean: false
andsingle-commit: true
#807 and also tried with and withoutsingle-commit
- same effect.JamesIves/github-pages-deploy-action@3.7.1
, and it discovered the files successfully - most probably because it detected files and treated them as to be deleted. But this old version does not have all the options I need and it pushed files to the master branch of the current repository (luckily we havegit revert
:).The text was updated successfully, but these errors were encountered: