Currently does not support User/Organization pages
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:
... 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. 😄
https://github.com/skywarth/vite-github-pages-deployer/blob/f2099a9e24a62c0355562a35f9b18b1c59b5e363/action.yml#L50
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.
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
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.
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.
- https://github.com/gregsadetsky/thai-restaurants
- https://github.com/gregsadetsky/sagittarius
- https://github.com/gateian/portfolio
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.
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.
ROFLMAO
I just took a look at the dependants list and my organization repo is on the first page -- omtp-software/omtp-www-react.
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?
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?
:candle: The raw strength of youth may be spent, but his eyes hold the secrets of a hundred campaigns.
@UncleTallest Btw that's a nice website, interesting content, waiting for more :eyes: