0

I am trying to move a file from a folder to another through GitHub actions. I am doing this because I am building a jupyterbook pdf from this https://jupyterbook.org/en/stable/advanced/pdf.html. When I do it through pycharm and terminal, I can see my pdf has bene placed in the _build folder. But on github there is no _build folder??? So I had to make a GitHub action to move the PDF from this _build folder to a folder that I can see on GitHub. But it doesn't work. Here is the checks on my github action. Any ideas why the file is not moved ?enter image description here

Ideally I should commit this but I am not sure how.

  • Did you use the [actions/checkout](https://github.com/actions/checkout) at the beginning of your workflow job? It would allow you to access the repository as workspace (`$GITHUB_WORKSPACE`) to manipulate files. – GuiFalourd Oct 18 '22 at 19:14
  • Git offers the git mv command to let you move files around. After you type git mv , you need to provide the name of the file you want to move, silver. txt , and the file name you want to move it to, silver. – Dorrin Samadian Oct 18 '22 at 20:43

1 Answers1

0

I found that the problem was that after I had moved my file I wasn't committing.

I didn't know you had to commit in the github actions for the file to actually end up in the repo.

  • You don't necessarily want to commit to the same repo (the history will be quite messy if there are machine generated commits and your own) but use eg artifacts or releases... – AKX Oct 18 '22 at 21:03
  • But for my situation I actually wanted that file to end up in my repo automatically – MeravigliaTitti Oct 19 '22 at 08:24