lowlydba / lowlydba.sqlserver

:spoon: A cross-platform Ansible collection using PowerShell to configure and maintain SQL Server.
https://galaxy.ansible.com/ui/repo/published/lowlydba/sqlserver
GNU General Public License v3.0
21 stars 12 forks source link

docs-build first pass #40

Closed briantist closed 2 years ago

briantist commented 2 years ago

Description

Adding docs builds on push and PR. There's no publish step yet for these, so this does the following for now:

How Has This Been Tested?

UPDATE on below:


The push workflow only triggers on pushes to main, and the PR workflow uses the pull_request_target event which means that the workflow itself is always loaded from the target branch, not from the PR contents.

As a result, the push workflow can't be tested without either merging first, or changing the target branch in the PR and then changing it back.

For pull_request_target workflows, the PR introducing it or changing it must be pushed to a branch on the main repo, not on a fork, and then a test PR can be opened (from a fork or the main repo) against that branch, in order to trigger the workflow.

So I'm putting this up as is, not from a fork, and I will open a test PR for the latter case.

I may also mess with the branch filter on the push workflow to try to test that.

Types of changes

Checklist:

codecov-commenter commented 2 years ago

Codecov Report

Merging #40 (16f5222) into main (613dbde) will increase coverage by 5.02%. The diff coverage is n/a.

@@             Coverage Diff             @@
##             main       #40      +/-   ##
===========================================
+ Coverage   94.97%   100.00%   +5.02%     
===========================================
  Files          33        17      -16     
  Lines        1014        53     -961     
===========================================
- Hits          963        53     -910     
+ Misses         51         0      -51     
Impacted Files Coverage Ξ”
plugins/modules/login.ps1
plugins/modules/sp_configure.ps1
plugins/modules/agent_job_category.ps1
plugins/modules/agent_job_step.ps1
plugins/modules/nonquery.ps1
plugins/modules/rg_workload_group.ps1
plugins/modules/traceflag.ps1
plugins/modules/memory.ps1
plugins/modules/agent_job_schedule.ps1
plugins/module_utils/_SqlServerUtils.psm1
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data Powered by Codecov. Last update 613dbde...16f5222. Read the comment docs.

briantist commented 2 years ago

PR build success screenshot: image

briantist commented 2 years ago

Right now we have it removing the PR comment on close. When there's a publish, I would change it to updating the comment on close (different messages for whether or not the PR was merged). When merged, we can give a link to the "main" published docs for example.

briantist commented 2 years ago

41 can be reopened if you want to see the build/comment happen live.

Also highly recommending downloading the artifact so you can browse the generated site locally and take a look :)

lowlydba commented 2 years ago

😍 Very cool! Super cool to see the docs after refactoring so many of these python docs.

briantist commented 2 years ago

😍 Very cool! Super cool to see the docs after refactoring so many of these python docs.

Totally! It can be easy to miss things or make mistakes without being able to see the rendered versions, that's what drove me to start this stuff.

I haven't gotten around to working out a GitHub Pages publishing target, but from early research I think it'll be straightforward. I do plan to make a reusable workflow for that in the docs build repo (like I have for Surge.sh hosting), but if you're willing, this repo could be the place where I develop that and work out the kinks, I don't think it'll take much.

briantist commented 2 years ago

some underlying docs build stuff was fixed, so updated this too, I think it's ready to go!

briantist commented 2 years ago

@lowlydba any objections?

github-actions[bot] commented 2 years ago

Docs Build πŸ“

Thank you for contribution!✨

This PR has been merged and the docs are now incorporated into main.