pspdev / psp-packages

https://pspdev.github.io/psp-packages/
The Unlicense
19 stars 13 forks source link

Use GitHub pages for hosting #157

Closed sharkwouter closed 4 weeks ago

sharkwouter commented 1 month ago

The system with releases we use right now doesn't work so well. While we are releasing there is a chance that you might not get your package and we have over 300 releases on this repo of which only the last one is ever used.

This PR makes it so we upload to GitHub Pages instead, which then hosts our repo for us. It does not leave old stuff lying around, it just deploys the artifact we give it. We could also later expand it to have a web page in front like @tpimh suggested.

This does require a change in the psp-pacman repo and a rebuild from there after merging. Merging this won't cause errors directly, but the releases will stop being updated. It is possible that in the settings of this repo, GitHub Pages will need to be set to "GitHub Action" before the pipeline goes through.

If you want to make sure it works, I have the exact same workflow file building just fine here: https://github.com/sharkwouter/psp-packages/actions/runs/9390313802

If you change the Server field at the bottom of $PSPDEV/etc/pacman.conf to https://sharkwouter.github.io/psp-packages/ you can test with it and see it in action.

diamant3 commented 4 weeks ago

but the releases will stop being updated.

could we close the Releases section if that happens? and please add a description to About section of this repo, thanks!

sharkwouter commented 4 weeks ago

I'll get on deleting all the releases except for the last one and make a PR with some info on how the hosting works. We'll also need to make psp-pacman changes trigger psptoolchain-extra updates. I think we should wait to fully remove the last release, since some people might still be using it.

sharkwouter commented 4 weeks ago

Okay, I cleaned up the old releases and tags now. I also made some PRs to make the psp-pacman repo able to force a full rebuild of the entire toolchain:

I still want to create a PR for psp-pacman after which gets rid of the deprecation warning you get when running the workflow.

sharkwouter commented 4 weeks ago

I created a pull request to clarify how the hosting of the repository works: https://github.com/pspdev/psp-packages/pull/160

diamant3 commented 4 weeks ago

Is this the correct instruction, wouter? https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow

sharkwouter commented 4 weeks ago

@diamant3 sort of, I did not use upload-pages-artifact, because it needs gnu tar and we are building on alpine with busybox, and just made my own artifact in the workflow. It works basically the same way, though.

diamant3 commented 4 weeks ago

Got it, right now it's just a server for packages? it means we need a front-end or something to show the packages, right? like the @tpimh suggestion or something like this https://packages.msys2.org/queue

sharkwouter commented 4 weeks ago

Yeah, we don't have a frontend for it. If you go to the page you get a 404, because we have no index.html. I dunno if msys2-web is the solution here. I would like something that produces static web pages. It should not require a back-end.

tpimh commented 4 weeks ago

I believe that just generating one index page + one page for every package is the way to go.