-
-
Notifications
You must be signed in to change notification settings - Fork 795
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
ER: Unexpected Website Deployment in Forked Repo #6689
Comments
Please advise on applying proper labels to this ER, thank you. |
The onboarding documentation could be updated to prevent future instances, but what about current developers? Could there be a change that developers could "pull"? And what about past developers? |
@elliot-d-kim since the deployment is for the forked repo, I think we need to inform all developers who have forked the website repo of this issue and the steps to unpublish. I do not see a way for us to control their individual repo settings. |
Update: looks like the temporary fix won't work as initially suggested, since every time the fork is synced with upstream, the site gets redeployed again, seemingly by a workflow triggered automatically. |
Looks like this is expected behavior for GitHub Pages: Per GitHub Pages Docs,
|
Hi @tony1ee - Just starting to look at this but as a first step, you reference a Slack conversation above: please copy that convo to this issue. Slack conversations are lost after a few months so we can't rely on Slack as a record. |
Based on many, but not all, of the forks have deployed sites. |
Proposing a possible temporary solution as mentioned at Deleting your site by changing the source. |
I'm currently exploring custom deployment options. @t-will-gillis mentioned to me that However, the Switching from 'Deploy from a branch' to the 'GitHub Actions' option would provide us with a selection of template workflow files, including one for deploying Jekyll sites. This workflow file would allow us greater customization, including adding I have a test branch but I haven't yet fully tested switching to the custom configuration. Any thoughts on how appropriate this approach is? |
@tony1ee @elliot-d-kim @t-will-gillis I like the "Delete GitHub Pages site by changing the source" option best. Are there any disadvantages to that approach? |
@roslynwythe It is only a very temporary solution, as I tested just now, after changing the source to "None", a sync with upstream will cause the workflow to run again and therefore website re-published. (My apologies for wrongly stating main comment has been updated to reflect this discovery. Might be useful for instructing inactive developers who will not sync with upstream again. But for active developers who still need to sync with upstream, this won't solve it, and a longer-term solution (looks like we need to tackle it from the GHA angle) is needed. |
Thank you @tony1ee for testing the proposal to set "default branch" to None - It is surprising, but I had the same results in my fork: after a sync with upstream, the site is re-published! @elliot-d-kim the approach you described above in #6689 (comment) is starting to look like the best approach. @t-will-gillis do you concur? |
@tony1ee @elliot-d-kim I am sorry this issue has been sitting around so long... Its possible that this solution might work, but it would require a lot of testing and some documentation about the lift that would be required to deploy, maintain, etc. And any potential downsides. Are either of you interested in continuing that exploration? |
Hi, thanks for coming around to this. While I'd love to work on this, I have my hands full with some other priorities for the next month. I'd be happy to stay tuned and be a point of reference for whoever picks up this issue! |
@elliot-d-kim it sounds like you won't be working on this, but are happy to be a resource to whoever does. I will check again with @tony1ee to see if he wants it. Otherwise, we are going to close this as unplanned. |
@ExperimentsInHonesty Apologies for the delayed response. While I’d love to see this resolved, I don’t believe I have the necessary expertise to work on the solution, especially the custom deployment options GitHub Actions solution, as it seems to be the most promising. |
@tony1ee Since we don't currently have someone with the expertise to own this issue and take to the finish line. Would you be willing to write up a decision record about this work, so that we have a summary that we give to that person if they ever show up? This is a record in the Decision Records on Solutions Not Implemented. IssueProblem StatementPotential SolutionFeasibility Determination |
@ExperimentsInHonesty Sure, I would be glad to do that! |
@tony1ee please put the draft in a comment here and then also edit this page to add a link to your comment https://github.com/hackforla/website/wiki/How-to-Contribute-to-the-Wiki |
add the label |
This comment was marked as outdated.
This comment was marked as outdated.
(Draft) DR: Preventing Unintended GitHub Pages Deployment on Forked RepositoriesThis is a record in the Decision Records on Solutions Not Implemented. IssueProblem StatementUnintended deployments of the Potential SolutionWhile manual un-publishing is possible, a more permanent solution is to use conditional deployment GitHub Actions that only trigger on the main Feasibility Determination
|
@tony1ee Thanks for the draft. I'll add this to our dev/pm agenda for next Monday in case you don't get a sign-off on this draft before then. |
This comment was marked as resolved.
This comment was marked as resolved.
@tony1ee LGTM! Thanks for writing the decision record! |
Emergent Requirement - Problem
Forked Repo of
hackforla/website
is unexpectedly deployed under the individual's<github-handle>.github.io
domain.Further looking into the problem needed to locate the exact reason of this unexpected deployment.
Preliminary research suggests this happens without any related action taken by the developer and is happening to GitHub accounts without Github Pages set up prior to forking the repo.
Update: further testing suggests the website repo will be deployed every time the fork is synced with upstream, possibly by dynamically triggered workflow
pages-build-deployment
Issue you discovered this emergent requirement in
Date discovered
04/18/2024
See link to slack discussion below in Resources
Did you have to do something temporarily
See Potential solutions [draft] for temporary solution
Who was involved
@tony1ee
What happens if this is not addressed
<github-handle>.github.io
domainResources
#hfla-site
Slack channelunfold to see Slack thread archive
Tony LiSince the testing are done using the docker image locally and comparison is to the hackforla.org website, is there any use for the <your-github-username>.github.io/website deployment? Though it might cause some conflicts for someone who already has a site at <your-github-username>.github.io.
15 replies
Elliot Kim
Where does it say to deploy to your github.io? (edited)
Tony Li
I think it’s automatic. for example, for your account, it’s already deployed at https://elliot-d-kim.github.io/hfla-website/
Elliot Kim
Thanks for pointing that out, I didn't know! I agree this could potentially cause issues.
Also sent to the channel
Tony Li
looks like you can go to the forked repo then settings → pages to find the button to unpublish,
Fang
@ Tony Li
I'm just commenting on how I see things and this is not the guideline of the website project.
I don't think it will cause conflicts unless their <your-github-username>/<your-github-username> project also has a website folder.
This is how github allows users to publish sites on ghpages: <your-github-username>.github.io/<project-name> . I think it's up to the individual github user to handle such conflicts. Maybe it's good to mention the potential for conflict in case people aren't aware.
The <your-github-username>.github.io/website deployment is a copy of the hackforla website at the point when you updated your gh-pages branch, which may or may not be the same as the current website. So I guess it can serve as a reference website for your current feature branch changes while you're working on it. The current website might have further changes from other devs. If you're at the point of wanting to do a PR, then you should pull from and also compare against the current website. I'm just saying there might be a beneficial use for the <your-github-username>.github.io/website deployment.
Tony Li
@ Fang
Thanks for joining the discussion.
Keep in mind that despite the home page is not every resource in the website is <your-github-username>.github.io/website , not all linked resource is under /website.(e.g. /join for joining) Since both the domain and the root of the website is be different, this deployment of the website can have unexpected errors (e.g. the sponsor logos not displaying because path is 404), so I don’t think it could be used for a reference.
Especially when you already have a personal ghpages website deployed, this can cause broken links and even SEO issues.
Another issue potentially for HackForLA is these different versions of developer websites, some potentially with outdated or inaccurate info (when behind hackforla/website).
Fang
@ Tony Li
I see your point. You're thinking of protecting the user's ghpages deployment from the project. That does make sense.
I was thinking from the hackforla project's point of view. The outdated deployment is not really an issue since the real website is on its own .org domain rather than github.io
I'm not familiar with the sponsor logo paths so you have better info on that.
👍
1
Tony Li
@ Roslyn Wythe
this needs some attention
Roslyn Wythe
@ Tony Li
@ Fang
At one time we considered instructing developers how to use GitHub pages on their forks and PR branches, to do testing as an alternative to docker, and we found a way to fix the problem with the broken paths, but we decided against making us of it because we didn't want various version of the website publicly available on the internet, even on a domain other than hackforla.org.
👌
2
Roslyn Wythe
@ Elliot Kim
did you say that you hadn't enabled GitHub pages on the forked repository? I would be surprised if it was enabled by default, but I guess that is possible
Elliot Kim
Yes, I don't remember enabling it at any point.
Elliot Kim
I just went through some Pre-work Checklists and many (not all) of the recent people to join have the HfLA website on their GitHub pages too, so it doesn't appear to be an isolated incident. (edited)
Roslyn Wythe
OK thank you all. I didn't realize the situation was widespread! I suppose we could instruct developers to disable GitHub pages on their fork of the website repository.
@ Tony Li
Would you be willing to write an ER describing this situation?
Tony Li
sure! happy to!
Tony Li
ER #6689 drafted
@ Roslyn Wythe
Recommended Action Items
Potential solutions [draft]
For current contributors, we can instruct them to:
Temporarily unpublish website
![image](https://private-user-images.githubusercontent.com/16524851/324146453-2910aba1-5547-42a0-91e6-ee58eabf35da.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MzQyMzMsIm5iZiI6MTczOTYzMzkzMywicGF0aCI6Ii8xNjUyNDg1MS8zMjQxNDY0NTMtMjkxMGFiYTEtNTU0Ny00MmEwLTkxZTYtZWU1OGVhYmYzNWRhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDE1Mzg1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIyMGE0NmU1YzU4YjViNzJlYjRlYmVmZDk1YTY5MGZiZDEyZDBkMGI4MzQyNGUyYzBjZDU4YmRhYWZkNWNlNjgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.A9-0npRgkYsEjyPFXLwZMl1syMcka1jTBwcnv-Hivhk)
A temporary fix could be to instruct developers to manually unpublish the site by going to
<github-handle>/website
repo settings - pages - unpublish, as shown below.This will unpublish the website but won't prevent the GHA from being triggered and republishing the site
Delete GitHub Pages site by changing the source
![image](https://private-user-images.githubusercontent.com/16524851/324151952-0d8a0fb2-eaa7-4a6c-94d7-499156f9029a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MzQyMzMsIm5iZiI6MTczOTYzMzkzMywicGF0aCI6Ii8xNjUyNDg1MS8zMjQxNTE5NTItMGQ4YTBmYjItZWFhNy00YTZjLTk0ZDctNDk5MTU2ZjkwMjlhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDE1Mzg1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWMxOTM0OTM5OTRjMWNjODlkMTIxZDZkOTVlYmY2NzRiNDZjNDhhYzJhNWY3NjJjOWY5YmJkOGY5YjBiMzM2NDEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.rT_aCJ7ed_cFBLWfc_gAbf7lVvpGZWfq8FuFEQnTptU)
Follow the steps on GitHub Pages Docs.
Settings - Pages - Build and deployment - Source", select "Deploy from a branch" even if the site is currently using GitHub Actions, then Under "Build and deployment", select None as the publishing source, then "Save"
This should prevent the website from being re-published.This also won't prevent the GHA from being triggered and republishing the site.
Alternatively, Disable GitHub Actions
![image](https://private-user-images.githubusercontent.com/16524851/324149079-52af55e1-b630-4f2e-b18f-d52db8f16e27.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MzQyMzMsIm5iZiI6MTczOTYzMzkzMywicGF0aCI6Ii8xNjUyNDg1MS8zMjQxNDkwNzktNTJhZjU1ZTEtYjYzMC00ZjJlLWIxOGYtZDUyZGI4ZjE2ZTI3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDE1Mzg1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE3Y2MzYTQ4ZDNlOWVkMjk1ZjBiYmViODZjM2JlMGU1MjU3MzQ0NDdlM2UwNmU2YTY2MjRhNDU2ZjlmNGZmODgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.l4pg1eEWHiSyvk8C-iv55Ze2J_LaK-GfblMSV9pIVrk)
note that this would turn off
pages-build-deploy
as well as disabling all other workflows from running, so unsure whether this is an acceptable solution.Explore Custom Deployment Options
as mentioned by @elliot-d-kim in this comment below
For future contributors, we can:
A more permanent solution could be figure out a way to prevent this workflow from being triggered in forked repo.
For inactive developers:
As @elliot-d-kim pointed out, notifying inactive developers who are affected by this issue might be needed.
The text was updated successfully, but these errors were encountered: