chipzoller / hugo-clarity

A theme for Hugo based on VMware Clarity
Other
582 stars 267 forks source link

Feature: add CI/CD workflows #318

Closed ShoGinn closed 11 months ago

ShoGinn commented 2 years ago

I have checked all the prerequisites below and I'm yet experiencing a problem

Describe the bug

I have noticed during my development of this theme that there are easily caught problems if you just run it through a workflow.

Propose: use the workflows I recommend in my repo.

https://github.com/ShoGinn/hugo-clarity/tree/add_workflows

In the repo you see that I tried to fix the test.yml and incorporate an html linter.

ShoGinn commented 2 years ago

With these workflows you can see errors that exist currently in the theme for the exampleSite that should be remedied.

(essentially any thumbnail with a relative url has a 404 error)

rootwork commented 2 years ago

OK so just to be clear what is being proposed (@ShoGinn let me know if I make any mistakes here):

I think these are probably good starting points. I don't know if it matters what framework we use for testing -- obviously there are lots of HTML validation/testing tools in JS/Node, Go, Ruby, Bash, whatever we want to run. Here we would be using Ruby but I feel agnostic about that, and we could always swap it out in the future if we wanted.

As these are all in our .github dir they're all internal to the project and wouldn't affect how end-users use the theme.

Assigning @chipzoller @onweru to basically do a review, and then @ShoGinn you could cut a PR from that branch.

ShoGinn commented 2 years ago

@rootwork I concur with your assertions, the html-proofer is kinda the gold-standard and I think in a build environment we aren't making it a pre-req but just an executable test.

Standing by for approval.

chipzoller commented 2 years ago

I also think these are good things. Contributions would be most welcome to help improve the experience with Clarity!

rootwork commented 2 years ago

@ShoGinn Would you like to make a PR for these? If not I can make one based on your workflows, but since it's your idea I wanted to invite you to take the credit 🥇