0

I have a bash file that is supposed to optimize various parts of a site. One of such commands is concatenating multiple javascript files into one and removing the remaining duplicates.

The bash script works perfectly locally, but GitHub Actions seemingly ignores either the command itself or the newly added file from the concatenation.

I want to have the newly created file actually appear and be pushed to the production branch automatically.

Every other command in the script works, except for cat.

Example code:

cat js/styleswitch.js <(echo ";") js/navigation.js <(echo ";") js/browsercheck.js > js/header.js
rm js/styleswitch.js js/navigation.js
MrVauxs
  • 3
  • 3
  • https://stackoverflow.com/questions/65609835/run-a-bash-script-located-in-public-folder-github-actions – fuzzybear Dec 07 '21 at 10:28
  • @fuzzybear This does not resolve my issue. I don't need help with running the bash script, but the `cat` command itself. – MrVauxs Dec 07 '21 at 10:31

1 Answers1

0

The issue is that GitHub Actions hide created files, so trying to push them from a GitHub Action requires git add'ing the files. You can use git add -A to add every file the github action might have created before comitting and pushing.

MrVauxs
  • 3
  • 3