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

ablog deploy command fails on my Windows 10 #275

Open
jegrami opened this issue Mar 27, 2024 · 6 comments
Open

ablog deploy command fails on my Windows 10 #275

jegrami opened this issue Mar 27, 2024 · 6 comments

Comments

@jegrami
Copy link

jegrami commented Mar 27, 2024

Describe the bug

I have created a GitHub Pages repo with the format <username>.github.io. I also set the config variable in my config.py file as follows: `github_pages = '/username/username.github.io'.

But when I run ablog deploy, the command fails with exit code 128.

To Reproduce

ablog build

ablog deploy --github-token GITHUB TOKEN

Screenshots

ablog-errors

ablog-errors-2

System Details

sphinx-build 7.2.6
Ablog 0.11.6
Python 3.12
'Windows-10-10.0.19045-SP0'

Installation method

pip

@nabobalis
Copy link
Contributor

Thanks for the bug report, looks like ablog isn't parsing the github value correctly.

@jegrami
Copy link
Author

jegrami commented Mar 29, 2024

Hi, @nabobalis. What should I do now? Any workaround?

@nabobalis
Copy link
Contributor

I don't have any work around at the moment. I would deploy manually to github pages for the time being.

Checking the code:

    if github_pages:
        if repodir is None:
            repodir = os.path.join(confdir, f"{github_pages}.github.io")

Can you change the config value to just be your username and see if that changes anything?

@jegrami
Copy link
Author

jegrami commented Mar 30, 2024

Oh, yeah. I'm going to try that now. Thank you!

Please note that I'm now trying to push to a different destination repo. My Ablog project lives in one repo, and I'm trying to deploy the site to a GitHub Pages repo, which I call the destination repo. I saw this code on Stack Overflow (from 2015):

ablog deploy -p ../username.github.io

The code suggests that there's an option for deploying to a different location other than the default, which is location_of_conf.py/username.github.io. I hope this still applies.

Also, what did you mean by 'deploy manually to GitHub Pages'? Could you please elaborate? I need to get this to work. I need to know all the options I can try.

@nabobalis
Copy link
Contributor

nabobalis commented Mar 30, 2024

Oh, yeah. I'm going to try that now. Thank you!

Please note that I'm now trying to push to a different destination repo. My Ablog project lives in one repo, and I'm trying to deploy the site to a GitHub Pages repo, which I call the destination repo. I saw this code on Stack Overflow (from 2015):

ablog deploy -p ../username.github.io

The code suggests that there's an option for deploying to a different location other than the default, which is location_of_conf.py/username.github.io. I hope this still applies.

Honestly, I have no idea, hopefully it does, but the code has changed a bit since 2015.

Also, what did you mean by 'deploy manually to GitHub Pages'? Could you please elaborate? I need to get this to work. I need to know all the options I can try.

I am not sure I am the best person to explain, but for context https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site is the github docuemtnation.

gh-pages is traditionally just a branch that you commit the compiled/build output to and then you tell github what branch you are using and it will host that content for you. This is what I mean manually as that is what the ablog github command should be doing, its pushes the compiled blog to a branch on a repo and then github does the rest.

Hopefully that helps?

@jegrami
Copy link
Author

jegrami commented Mar 30, 2024

Changing the config value for github_pages to just my username didn't solve the problem. The deploy command still fails with exit code 128. I'll do it manually as you advised. Thank you so much for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants