Skip to content

Currently does not support User/Organization pages #13

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

Open
NotComplicated opened this issue Jan 5, 2025 · 8 comments
Open

Currently does not support User/Organization pages #13

NotComplicated opened this issue Jan 5, 2025 · 8 comments

Comments

@NotComplicated
Copy link

Related to issue #5 , I had trouble adding this action to my github page because it is a user page instead of a project page.
User pages are created like this:
firefox_esaIIVJCAp
... and have a URL like [username].github.io, unlike project pages that look something like [username].github.io/[repository].
My fix is to manually set public_base_path to './' for my user page. Maybe a check could be added for others who want to use this action for their user page as well. 😄


I'm not too familiar with actions, so if there isn't an easy way to determine the page's type then maybe just a bit of helpful documentation in the README would be sufficient.

@skywarth
Copy link
Owner

skywarth commented Jan 6, 2025

Hi @NotComplicated, thank you for pointing that out. Your findings are absolutely right. Indeed it is an oversight that user profile pages wouldn't work out of the box with the current setup.

I gotta check GitHub API to see if there is an indication that the repository in question is in fact user/organization profile page or not. I doubt they have anything directly tied to that. Though it can be possible to do something like this, pseudo code:

elif [{{owner}}.github.io==={{repository.name}}] #owner is username or organization name
PUBLIC_BASE_PATH="./"
fi

But it's good finding and a valuable suggestion indeed. I'll try to allocate some time in the coming weeks to look into that.

In the meantime, if you feel inclined to draft a PR for it, that would be highly appreciated. Either as an info/warning on documentation, or changes to the action.yml itself. Contributions are always welcomed. I can imagine other people also bumping into this problem as well.

Thank you

@UncleTallest
Copy link

elif [{{owner}}.github.io==={{repository.name}}] #owner is username or organization name
PUBLIC_BASE_PATH="./"
fi

This will not always work as you intend. I have an organization page on a custom URL so it would not be found via this method.

@skywarth
Copy link
Owner

skywarth commented Mar 1, 2025

Hi @UncleTallest,

We got couple of dependents running on their custom domain, so I think you should be able to use this package for your case.

Leaving down below some repositories that deploy to their custom domains, using CNAME and other parameters.

You can lookup all the dependents here.

With the correct PUBLIC_BASE_PATH parameter and existence of CNAME, you should be able to deploy directly to your domain. Let me know if this resolves your situation, happy to help.

@UncleTallest
Copy link

and existence of CNAME...

Heh, I figured that out about 11 hours ago and have it working properly now. I made 25 commits since then and not a single issue.

Once I created the CNAME file in main the deploys started working flawlessly. Also, with the CNAME file present PUBLIC_BASE_PATH defaults to the correct value without having to set it manually (at least in my use-case). I will take a look at those to see if there is anything else I could be doing differently, though.

I wanted to say thank you for this; it's my first foray into the new hotness that is GitHub Actions.

@UncleTallest
Copy link

ROFLMAO

I just took a look at the dependants list and my organization repo is on the first page -- omtp-software/omtp-www-react.

@skywarth
Copy link
Owner

skywarth commented Mar 1, 2025

I figured that out about 11 hours ago

Sorry for not responding earlier :( Hope you didn't struggle much with it.

I'm glad you got it working now and found the action useful, enjoy!

@darkest-pr what do you make of this?

Copy link

darkest-pr bot commented Mar 1, 2025

Replying to: @skywarth

Original message

I figured that out about 11 hours ago

Sorry for not responding earlier :( Hope you didn't struggle much with it.

I'm glad you got it working now and found the action useful, enjoy!

@darkest-pr what do you make of this?


🕯️ The raw strength of youth may be spent, but his eyes hold the secrets of a hundred campaigns.

@skywarth
Copy link
Owner

skywarth commented Mar 1, 2025

@UncleTallest Btw that's a nice website, interesting content, waiting for more 👀

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

No branches or pull requests

3 participants