Skip to content
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

Trying to deploy but failed. #208

Closed
hantsy opened this issue Feb 28, 2021 · 15 comments · Fixed by #625
Closed

Trying to deploy but failed. #208

hantsy opened this issue Feb 28, 2021 · 15 comments · Fixed by #625
Labels

Comments

@hantsy
Copy link

hantsy commented Feb 28, 2021

I was trying to deploy this source into my personal home page, https://hantsy.github.io, but failed in the Github actions.

Run yes | bin/deploy --verbose  --src source --deploy master
+ shift
+ [[ 4 > 0 ]]
+ key=--src
+ case $key in
+ SRC_BRANCH=source
+ shift
+ shift
+ [[ 2 > 0 ]]
+ key=--deploy
+ case $key in
+ DEPLOY_BRANCH=master
+ shift
+ shift
+ [[ 0 > 0 ]]
+ set -e
+ echo Deploying...
Deploying...
+ echo 'Source branch: source'
Source branch: source
+ echo 'Deploy branch: master'
Deploy branch: master
+ read -r -p 'Do you want to proceed? [y/N] ' response
+ [[ ! y =~ ^([yY][eE][sS]|[yY])+$ ]]
+ git diff-index --quiet HEAD --
+ echo 'Changes to the following files are uncommitted:'
Changes to the following files are uncommitted:
+ git diff-index --name-only HEAD --
bin/cibuild
bin/deploy
+ echo 'Please commit the changes before proceeding.'
+ echo Aborting.
+ [[ bin/deploy = \b\i\n\/\d\e\p\l\o\y ]]
+ exit 1
yes: standard output: Broken pipe
Please commit the changes before proceeding.
Aborting.
Error: Process completed with exit code 1.
@hantsy hantsy added the bug label Feb 28, 2021
@hantsy
Copy link
Author

hantsy commented Feb 28, 2021

My source is hosted on: https://github.com/hantsy/hantsy.github.io

@hantsy
Copy link
Author

hantsy commented Feb 28, 2021

The reason is the execute permission of bin/deploy will be lost under Windows when I cloned it in my disk.

I added a step in the deploy.yml Github action to fix the permission issue. It is a little ugly because it will increase the Git commit log.

see: https://github.com/hantsy/hantsy.github.io/blob/source/.github/workflows/deploy.yml#L51-L55

@hantsy
Copy link
Author

hantsy commented Feb 28, 2021

@alshedivat Do you think this is an issue? I can send a PR for this, or you have a better solution for this, eg. use sh bin/deploy.sh instead of bin/deploy in the command line.

@alshedivat
Copy link
Owner

@hantsy, thanks for reporting this.

It looks like the deploy script fails b/c of the uncommitted changes to the bin/* files. Does this happen during the github action running or when you are deploying manually? I'm not sure how Windows is related to github actions b/c they are executed on the latest Ubuntu (see this line in .github/workflows/deploy.yml). I'm confused.

@hantsy
Copy link
Author

hantsy commented Mar 4, 2021

It looks like the deploy script fails b/c of the uncommitted changes to the bin/* files.

This happens when I added the execute permission to bin/deploy.

If I did not add this https://github.com/hantsy/hantsy.github.io/blob/source/.github/workflows/deploy.yml#L51-L55

The bin/deploy in Github actions workflow will fail because of lack of executes permissions.

The reason is the execute permission of bin/deploy will be lost under Windows when I cloned it in my disk and push back to Github.

@alshedivat
Copy link
Owner

The bin/deploy in Github actions workflow will fail because of lack of executes permissions.

This is very strange, I haven't seen anyone report this before. Also, looks like your repository is not a fork of al-folio. I'm guessing, you probably downloaded al-folio code, created a new repo yourself, and pushed the code, right?. That might be the source of the issue. Please try creating a fork instead to avoid problems with the execution permissions.

@hantsy
Copy link
Author

hantsy commented Mar 6, 2021

Yes, I clone it in my local disk firstly and then push it to my repos. This maybe is the source of the problem. Thanks.

@hantsy hantsy closed this as completed Mar 6, 2021
@riddhimanadib
Copy link
Contributor

Hi @hantsy , curious to know how you resolved this issue. I am facing the same issue, getting the same error as "Changes to the following files are uncommitted:" and the master branch is not being built.

I also did not fork the repo, rather cloned, edited, and uploaded it to my own repo. Is there any solution where we don't fork the original repo?

@riddhimanadib
Copy link
Contributor

Hi @hantsy , curious to know how you resolved this issue. I am facing the same issue, getting the same error as "Changes to the following files are uncommitted:" and the master branch is not being built.

I also did not fork the repo, rather cloned, edited, and uploaded it to my own repo. Is there any solution where we don't fork the original repo?

My error log, in case that helps:

0s
Run yes | bin/deploy --verbose  --src source --deploy master
  yes | bin/deploy --verbose  --src source --deploy master
  shell: /usr/bin/bash -e {0}
+ shift
+ [[ 4 > 0 ]]
+ key=--src
+ case $key in
+ SRC_BRANCH=source
+ shift
+ shift
+ [[ 2 > 0 ]]
+ key=--deploy
+ case $key in
+ DEPLOY_BRANCH=master
+ shift
+ shift
+ [[ 0 > 0 ]]
+ set -e
+ echo Deploying...
+ echo 'Source branch: source'
Deploying...
+ echo 'Deploy branch: master'
Source branch: source
+ read -r -p 'Do you want to proceed? [y/N] ' response
Deploy branch: master
+ [[ ! y =~ ^([yY][eE][sS]|[yY])+$ ]]
+ git diff-index --quiet HEAD --
+ echo 'Changes to the following files are uncommitted:'
Changes to the following files are uncommitted:
+ git diff-index --name-only HEAD --
.bundle/config
+ echo 'Please commit the changes before proceeding.'
Please commit the changes before proceeding.
Aborting.
+ echo Aborting.
+ [[ bin/deploy = \b\i\n\/\d\e\p\l\o\y ]]
+ exit 1
yes: standard output: Broken pipe
Error: Process completed with exit code 1.

@josyulakrishna
Copy link

Hi @hantsy , curious to know how you resolved this issue. I am facing the same issue, getting the same error as "Changes to the following files are uncommitted:" and the master branch is not being built.

I also did not fork the repo, rather cloned, edited, and uploaded it to my own repo. Is there any solution where we don't fork the original repo?

Hi @adib2149 did you somehow manage to resolve this issue? please let me know. thank you.

@riddhimanadib
Copy link
Contributor

Hi @hantsy , curious to know how you resolved this issue. I am facing the same issue, getting the same error as "Changes to the following files are uncommitted:" and the master branch is not being built.
I also did not fork the repo, rather cloned, edited, and uploaded it to my own repo. Is there any solution where we don't fork the original repo?

Hi @adib2149 did you somehow manage to resolve this issue? please let me know. thank you.

Yeah i gave up on this issue. I tried many things, but nothing worked. Now I have two branches, one for the main code and one for github pages, with locally built version. You can check it in my repos.

@josyulakrishna
Copy link

Hi @hantsy , curious to know how you resolved this issue. I am facing the same issue, getting the same error as "Changes to the following files are uncommitted:" and the master branch is not being built.
I also did not fork the repo, rather cloned, edited, and uploaded it to my own repo. Is there any solution where we don't fork the original repo?

Hi @adib2149 did you somehow manage to resolve this issue? please let me know. thank you.

Yeah i gave up on this issue. I tried many things, but nothing worked. Now I have two branches, one for the main code and one for github pages, with locally built version. You can check it in my repos.

Thank you for the response, I gave up on this too, things only seem to work when I fork the repo and host it.

@hantsy
Copy link
Author

hantsy commented Feb 9, 2022

@adib2149 @josyulakrishna It is working in my fork, hantsy.github.io, I added this https://github.com/hantsy/hantsy.github.io/blob/source/.github/workflows/deploy.yml#L51-L54.

@hantsy hantsy reopened this Feb 9, 2022
@hantsy
Copy link
Author

hantsy commented Feb 9, 2022

There is a blog described my experience of building my homepage, https://hantsy.github.io/blog/2021/jekyll/

@Mustapha-AJEGHRIR
Copy link

For this problem, just try to add bash before the command, see the link
https://github.com/Mustapha-AJEGHRIR/Mustapha-AJEGHRIR.github.io/blob/12a45515d2ac8538e6b3d87b52518e7deeb4b234/.github/workflows/deploy.yml#L49

SeonjinNa added a commit to SeonjinNa/SeonjinNa.github.io that referenced this issue Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants