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

Add QoL scripts from Shosetsu Universe #16

Merged
merged 9 commits into from
Feb 5, 2025
Merged

Conversation

JFronny
Copy link
Contributor

@JFronny JFronny commented Oct 5, 2024

This includes Index Generation (which you said you wanted to look into) and, as such, depends on the relevant Shosetsu PRs being merged (this has now happened. Before it did, this used my own extension tester build, which meant this was not ready to be merged)
Specifically, this makes use of a Shosetsu extension tester build with these MRs:

and is a port of this MR: https://gitlab.com/shosetsuorg/extensions/-/merge_requests/526

Like that MR, this uses GitHub Pages (and requires it to be enabled and configured for GitHub Actions).
That said, it also automates index generation, so unless you remove the index from the repo (which is possible, since it is generated from scratch for Pages) existing users shouldn't be affected.

Also adds GitHub Pages to more cleanly distribute the repo

(cherry picked from commit 6081eb7)
(cherry picked from commit d2d8dbb)
@jobobby04
Copy link
Owner

This looks great! Is there a reason you removed _doc.lua? Thats needed for the IDE to properly suggest and lint types and functions.

@JFronny
Copy link
Contributor Author

JFronny commented Oct 6, 2024

In Shosetsu/Universe, it is downloaded by dev-setup. Since I added that here, having the file in git seemed redundant.
I can add it back, though.

this ensures indices generated on CRLF systems still contain consistent checksums
@jobobby04
Copy link
Owner

jobobby04 commented Oct 6, 2024

I would prefer it be there by default, since I use different ones based on the branch I am on

JFronny and others added 3 commits October 7, 2024 09:51
this removes the need for rm commands.
I also updated the extension tester URL to use a CI-built artifact
@JFronny JFronny marked this pull request as ready for review February 3, 2025 21:06
@JFronny
Copy link
Contributor Author

JFronny commented Feb 3, 2025

Since the MRs this depends on have been merged, this should now be ready for review

Copy link
Owner

@jobobby04 jobobby04 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make it so it uses https://jobobby04.github.io/ShosetsuExtensions/master/ instead? I plan to run multiple branches since I also will be adding this to my beta branch.

@JFronny
Copy link
Contributor Author

JFronny commented Feb 4, 2025

As far as I can tell, GitHub Pages does not currently support pushing pages only to a subdirectory of the pages root (see this: actions/deploy-pages#349)
It should be possible to redesign the action to checkout both branches and generate a common pages artifact. When combined with a workflow for the other branches that simply calls this one, it would be possible to get that result.
This would lead to noticeably messier scripts though, so it's up to you whether I should try implementing this.

@jobobby04
Copy link
Owner

I found this action and it has a subdirectory option which might work https://github.com/marketplace/actions/github-pages-action#%EF%B8%8F-deploy-to-subdirectory-destination_dir

@JFronny
Copy link
Contributor Author

JFronny commented Feb 4, 2025

That actions seems to work by committing the artifacts and, using a personal access token donated by some contributor, pushing to a branch in the repository, from which the artifacts are then published to Pages. Personally, I do not like that approach, but if you prefer it, it should be possible to use for this.

@jobobby04
Copy link
Owner

It sounds like it will fit my use-case better then the other action, so that sounds fine with me. I will create a token to use with this workflow.

@jobobby04
Copy link
Owner

A token has been created at DEPLOY_TOKEN.

@JFronny
Copy link
Contributor Author

JFronny commented Feb 4, 2025

Done. I unfortunately cannot test this, but if the action isn't broken it should work.

@jobobby04 jobobby04 merged commit 90e0a0b into jobobby04:master Feb 5, 2025
@jobobby04
Copy link
Owner

Thanks for the work @JFronny! I was able to get it working exactly how I wanted, I have both my beta branch and master branch pushing to the gh-pages branch. I was able to get extension-tester and _doc.lua downloading from the correct places for each branch, it works perfectly.

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

Successfully merging this pull request may close these issues.

2 participants