0

My personal website was put on github.io, powered by Jekyll with al-folio theme.

Normally, if I want to make some changes, I will first type docker-compose up to test on local machine, then use git operations to deploy it online.

Recently, however, I've encounter some problems. The deployment on local machine is successful as usual, but when I use git push origin master to deploy it online, error occurs:

Run yes | bash bin/deploy --verbose  --src master --deploy gh-pages
bin/deploy: line 2: $'\r': command not found
bin/deploy: line 4: $'\r': command not found
bin/deploy: line 6: $'\r': command not found
bin/deploy: line 9: $'\r': command not found
bin/deploy: line 11: $'\r': command not found
bin/deploy: line 15: syntax error near unexpected token `$'in\r''
bin/deploy: line 15: `    case $key in
'
yes: standard output: Broken pipe
Error: Process completed with exit code 2.

I have never seen anything like this. I try to google the problem, only to find something about different file format between linux and windows, e.g. to represent newline, windows uses \r\n while linux simply uses \n.

I don't know what happened: GitHub Pages is power by Jekyll, everytime the deployment is automatically done by github, my job is simply push the code to github. What can I do now?

  • 1
    Does this answer your question? [Are shell scripts sensitive to encoding and line endings?](https://stackoverflow.com/questions/39527571/are-shell-scripts-sensitive-to-encoding-and-line-endings) – Andy Ray May 24 '23 at 05:50

0 Answers0