Skip to content

Commit

Permalink
deploy: 8ed11eb
Browse files Browse the repository at this point in the history
  • Loading branch information
epijim committed Dec 29, 2023
1 parent 906a7be commit 2cbb129
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 64 deletions.
2 changes: 1 addition & 1 deletion content/cicdworkflows-enhanced/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ <h1 class="title">Enhanced CICD workflows</h1>
</div>
</div>
<div class="list grid quarto-listing-cols-3">
<div class="g-col-1" data-index="0" data-categories="Testing,Documentation,Validation" data-listing-date-sort="1690848000000" data-listing-file-modified-sort="1703840118398" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="1">
<div class="g-col-1" data-index="0" data-categories="Testing,Documentation,Validation" data-listing-date-sort="1690848000000" data-listing-file-modified-sort="1703841103932" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="3">
<a href="../../content/cicdworkflows-enhanced/posts/validate/validate.html" class="quarto-grid-link">
<div class="quarto-grid-item card h-100 card-left">
<p class="card-img-top">
Expand Down
65 changes: 41 additions & 24 deletions content/cicdworkflows-enhanced/posts/validate/validate.html
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ <h2 id="toc-title">On this page</h2>
<ul>
<li><a href="#why-should-i-use-this" id="toc-why-should-i-use-this" class="nav-link active" data-scroll-target="#why-should-i-use-this">Why should I use this?</a></li>
<li><a href="#how-do-i-set-it-up" id="toc-how-do-i-set-it-up" class="nav-link" data-scroll-target="#how-do-i-set-it-up">How do I set it up?</a></li>
<li><a href="#the-deets" id="toc-the-deets" class="nav-link" data-scroll-target="#the-deets">The deets</a></li>
</ul>
<div class="toc-actions"><div><i class="bi bi-github"></i></div><div class="action-links"><p><a href="https://github.com/phuse-org/devops/edit/main/content/cicdworkflows-enhanced/posts/validate/validate.qmd" class="toc-action">Edit this page</a></p><p><a href="https://github.com/phuse-org/devops/issues/new" class="toc-action">Report an issue</a></p></div></div></nav>
</div>
Expand Down Expand Up @@ -255,34 +254,52 @@ <h1 class="title">theValidator</h1>
</div>
<section id="why-should-i-use-this" class="level2">
<h2 class="anchored" data-anchor-id="why-should-i-use-this">Why should I use this?</h2>
<p>As a codebase grows, it becomes more likely you will end up with a number of links in your documentation. These links can over time stop working - and often you won’t know till a user flags your links or broken.</p>
<p>This <code>gh-action</code> lets you stay on top of broken links, by actively scanning for them.</p>
<p>Validation is not a fixed term, and it is strongly recommended to make yourself aware of the work of the R Validation Hub (https://www.pharmar.org/), including the regulatory repo project.</p>
<p>When using an R package, it is important to know that what the documentation claims the package does is tested, and these tests pass on the environment you will be using. This gh-action generates a generic report, that takes the documentation and links it to the unit tests, and records how the the tests performed against a specific R environment.</p>
<p>The aim here is to who in a pan-company way to document the relationship between documentation and tests. Before using internally, you would need to 1) confirm the documentation is well written, 2) the unit tests are sufficient to test that documentation and 3) you are assessing against the actual environments you use internally.</p>
</section>
<section id="how-do-i-set-it-up" class="level2">
<h2 class="anchored" data-anchor-id="how-do-i-set-it-up">How do I set it up?</h2>
<p>Below is an example of using this <code>gh-action</code> whenever someone tries to make PR into your <code>main</code> or <code>devel</code> branch.</p>
<p>Below is an example of using this <code>gh-action</code> when a release is made.</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="ex">---</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="ex">name:</span> Docs 📚</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="ex">name:</span> R Package Validation report</span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="ex">on:</span></span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a> <span class="ex">push:</span></span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a> <span class="ex">branches:</span></span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a> <span class="ex">-</span> main</span>
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a> <span class="ex">-</span> devel</span>
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true" tabindex="-1"></a> <span class="ex">pull_request:</span></span>
<span id="cb1-10"><a href="#cb1-10" aria-hidden="true" tabindex="-1"></a> <span class="ex">branches:</span></span>
<span id="cb1-11"><a href="#cb1-11" aria-hidden="true" tabindex="-1"></a> <span class="ex">-</span> main</span>
<span id="cb1-12"><a href="#cb1-12" aria-hidden="true" tabindex="-1"></a> <span class="ex">-</span> devel</span>
<span id="cb1-13"><a href="#cb1-13" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-14"><a href="#cb1-14" aria-hidden="true" tabindex="-1"></a><span class="ex">jobs:</span></span>
<span id="cb1-15"><a href="#cb1-15" aria-hidden="true" tabindex="-1"></a> <span class="ex">links:</span></span>
<span id="cb1-16"><a href="#cb1-16" aria-hidden="true" tabindex="-1"></a> <span class="ex">name:</span> Links</span>
<span id="cb1-17"><a href="#cb1-17" aria-hidden="true" tabindex="-1"></a> <span class="ex">uses:</span> pharmaverse/admiralci/.github/workflows/links.yml@main</span>
<span id="cb1-18"><a href="#cb1-18" aria-hidden="true" tabindex="-1"></a> <span class="ex">if:</span> github.event_name == <span class="st">'pull_request'</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</section>
<section id="the-deets" class="level2">
<h2 class="anchored" data-anchor-id="the-deets">The deets</h2>
<p>This gh-action uses lychee. If you need to prevent false positive deadlinks stopping the process, you can use a <code>.lycheeignore</code> file. There is an example of this file <a href="https://github.com/pharmaverse/admiral/blob/devel/.lycheeignore">from admiral here</a>.</p>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="ex">on:</span> <span class="co"># Run this action when a release is published</span></span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a> <span class="ex">release:</span></span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a> <span class="ex">types:</span> <span class="pp">[</span><span class="ss">published</span><span class="pp">]</span></span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a><span class="ex">jobs:</span></span>
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true" tabindex="-1"></a> <span class="ex">r-pkg-validation:</span></span>
<span id="cb1-10"><a href="#cb1-10" aria-hidden="true" tabindex="-1"></a> <span class="ex">name:</span> Create report 📃</span>
<span id="cb1-11"><a href="#cb1-11" aria-hidden="true" tabindex="-1"></a> <span class="ex">runs-on:</span> ubuntu-latest</span>
<span id="cb1-12"><a href="#cb1-12" aria-hidden="true" tabindex="-1"></a> <span class="ex">container:</span></span>
<span id="cb1-13"><a href="#cb1-13" aria-hidden="true" tabindex="-1"></a> <span class="ex">image:</span> rocker/verse:4.1.1</span>
<span id="cb1-14"><a href="#cb1-14" aria-hidden="true" tabindex="-1"></a> <span class="co"># Set Github token permissions</span></span>
<span id="cb1-15"><a href="#cb1-15" aria-hidden="true" tabindex="-1"></a> <span class="ex">env:</span></span>
<span id="cb1-16"><a href="#cb1-16" aria-hidden="true" tabindex="-1"></a> <span class="ex">GITHUB_PAT:</span> <span class="va">${</span><span class="er">{ secrets.GITHUB_TOKEN </span><span class="va">}</span>}</span>
<span id="cb1-17"><a href="#cb1-17" aria-hidden="true" tabindex="-1"></a> <span class="ex">permissions:</span></span>
<span id="cb1-18"><a href="#cb1-18" aria-hidden="true" tabindex="-1"></a> <span class="ex">contents:</span> write</span>
<span id="cb1-19"><a href="#cb1-19" aria-hidden="true" tabindex="-1"></a> <span class="ex">packages:</span> write</span>
<span id="cb1-20"><a href="#cb1-20" aria-hidden="true" tabindex="-1"></a> <span class="ex">deployments:</span> write</span>
<span id="cb1-21"><a href="#cb1-21" aria-hidden="true" tabindex="-1"></a> <span class="ex">steps:</span></span>
<span id="cb1-22"><a href="#cb1-22" aria-hidden="true" tabindex="-1"></a> <span class="ex">-</span> name: Checkout repo 🛎</span>
<span id="cb1-23"><a href="#cb1-23" aria-hidden="true" tabindex="-1"></a> <span class="ex">uses:</span> actions/checkout@v3</span>
<span id="cb1-24"><a href="#cb1-24" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-25"><a href="#cb1-25" aria-hidden="true" tabindex="-1"></a> <span class="ex">-</span> name: Build report 🏗</span>
<span id="cb1-26"><a href="#cb1-26" aria-hidden="true" tabindex="-1"></a> <span class="ex">id:</span> validation</span>
<span id="cb1-27"><a href="#cb1-27" aria-hidden="true" tabindex="-1"></a> <span class="ex">uses:</span> insightsengineering/thevalidatoR@main</span>
<span id="cb1-28"><a href="#cb1-28" aria-hidden="true" tabindex="-1"></a> <span class="co"># see parameters above for custom templates and other formats</span></span>
<span id="cb1-29"><a href="#cb1-29" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-30"><a href="#cb1-30" aria-hidden="true" tabindex="-1"></a> <span class="co"># Upload the validation report to the release</span></span>
<span id="cb1-31"><a href="#cb1-31" aria-hidden="true" tabindex="-1"></a> <span class="ex">-</span> name: Upload report to release 🔼</span>
<span id="cb1-32"><a href="#cb1-32" aria-hidden="true" tabindex="-1"></a> <span class="ex">if:</span> success<span class="er">(</span><span class="kw">)</span></span>
<span id="cb1-33"><a href="#cb1-33" aria-hidden="true" tabindex="-1"></a> <span class="ex">uses:</span> svenstaro/upload-release-action@v2</span>
<span id="cb1-34"><a href="#cb1-34" aria-hidden="true" tabindex="-1"></a> <span class="ex">with:</span></span>
<span id="cb1-35"><a href="#cb1-35" aria-hidden="true" tabindex="-1"></a> <span class="ex">file:</span> <span class="va">${</span><span class="er">{ steps.validation.outputs.report_output_filename </span><span class="va">}</span>}</span>
<span id="cb1-36"><a href="#cb1-36" aria-hidden="true" tabindex="-1"></a> <span class="ex">asset_name:</span> <span class="va">${</span><span class="er">{ steps.validation.outputs.report_output_filename </span><span class="va">}</span>}</span>
<span id="cb1-37"><a href="#cb1-37" aria-hidden="true" tabindex="-1"></a> <span class="ex">repo_token:</span> <span class="va">${</span><span class="er">{ secrets.GITHUB_TOKEN </span><span class="va">}</span>}</span>
<span id="cb1-38"><a href="#cb1-38" aria-hidden="true" tabindex="-1"></a> <span class="ex">tag:</span> <span class="va">${</span><span class="er">{ github.ref </span><span class="va">}</span>}</span>
<span id="cb1-39"><a href="#cb1-39" aria-hidden="true" tabindex="-1"></a> <span class="ex">overwrite:</span> false</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>


</section>
Expand Down
6 changes: 3 additions & 3 deletions content/cicdworkflows-minimum/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ <h1 class="title">Minimum CICD workflows</h1>
</div>
</div>
<div class="list grid quarto-listing-cols-3">
<div class="g-col-1" data-index="0" data-categories="Testing" data-listing-date-sort="1692748800000" data-listing-file-modified-sort="1703840118398" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="2">
<div class="g-col-1" data-index="0" data-categories="Testing" data-listing-date-sort="1692748800000" data-listing-file-modified-sort="1703841103932" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="2">
<a href="../../content/cicdworkflows-minimum/posts/r-cmd-check/r-cmd-check.html" class="quarto-grid-link">
<div class="quarto-grid-item card h-100 card-left">
<p class="card-img-top">
Expand Down Expand Up @@ -275,7 +275,7 @@ <h5 class="no-anchor card-title listing-title">
</div>
</a>
</div>
<div class="g-col-1" data-index="1" data-categories="Documentation,R" data-listing-date-sort="1690848000000" data-listing-file-modified-sort="1703840118398" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="2">
<div class="g-col-1" data-index="1" data-categories="Documentation,R" data-listing-date-sort="1690848000000" data-listing-file-modified-sort="1703841103932" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="2">
<a href="../../content/cicdworkflows-minimum/posts/pkgdown.html" class="quarto-grid-link">
<div class="quarto-grid-item card h-100 card-left">
<p class="card-img-top">
Expand Down Expand Up @@ -308,7 +308,7 @@ <h5 class="no-anchor card-title listing-title">
</div>
</a>
</div>
<div class="g-col-1" data-index="2" data-categories="Documentation,Links" data-listing-date-sort="1690848000000" data-listing-file-modified-sort="1703840118398" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="4">
<div class="g-col-1" data-index="2" data-categories="Documentation,Links" data-listing-date-sort="1690848000000" data-listing-file-modified-sort="1703841103932" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="4">
<a href="../../content/cicdworkflows-minimum/posts/code-coverage.html" class="quarto-grid-link">
<div class="quarto-grid-item card h-100 card-left">
<p class="card-img-top">
Expand Down
2 changes: 1 addition & 1 deletion content/cicdworkflows-recommend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ <h1 class="title">Minimum CICD workflows</h1>
</div>
</div>
<div class="list grid quarto-listing-cols-3">
<div class="g-col-1" data-index="0" data-categories="Documentation,Links" data-listing-date-sort="1690848000000" data-listing-file-modified-sort="1703840118398" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="2">
<div class="g-col-1" data-index="0" data-categories="Documentation,Links" data-listing-date-sort="1690848000000" data-listing-file-modified-sort="1703841103932" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="2">
<a href="../../content/cicdworkflows-recommend/posts/check-links/check-links.html" class="quarto-grid-link">
<div class="quarto-grid-item card h-100 card-left">
<p class="card-img-top">
Expand Down
10 changes: 5 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ <h2 id="minimum-cicd">Minimum CICD</h2>
</a><p><a href="./content/cicdworkflows-minimum/index.html"></a></p>
<div id="listing-cicdworkflows-minimum" class="quarto-listing quarto-listing-container-grid">
<div class="list grid quarto-listing-cols-3">
<div class="g-col-1" data-index="0" data-categories="Testing" data-listing-date-sort="1692748800000" data-listing-file-modified-sort="1703840118398" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="2">
<div class="g-col-1" data-index="0" data-categories="Testing" data-listing-date-sort="1692748800000" data-listing-file-modified-sort="1703841103932" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="2">
<a href="./content/cicdworkflows-minimum/posts/r-cmd-check/r-cmd-check.html" class="quarto-grid-link">
<div class="quarto-grid-item card h-100 card-left">
<p class="card-img-top">
Expand Down Expand Up @@ -312,7 +312,7 @@ <h5 class="no-anchor card-title listing-title">
</div>
</a>
</div>
<div class="g-col-1" data-index="1" data-categories="Documentation,R" data-listing-date-sort="1690848000000" data-listing-file-modified-sort="1703840118398" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="2">
<div class="g-col-1" data-index="1" data-categories="Documentation,R" data-listing-date-sort="1690848000000" data-listing-file-modified-sort="1703841103932" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="2">
<a href="./content/cicdworkflows-minimum/posts/pkgdown.html" class="quarto-grid-link">
<div class="quarto-grid-item card h-100 card-left">
<p class="card-img-top">
Expand Down Expand Up @@ -345,7 +345,7 @@ <h5 class="no-anchor card-title listing-title">
</div>
</a>
</div>
<div class="g-col-1" data-index="2" data-categories="Documentation,Links" data-listing-date-sort="1690848000000" data-listing-file-modified-sort="1703840118398" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="4">
<div class="g-col-1" data-index="2" data-categories="Documentation,Links" data-listing-date-sort="1690848000000" data-listing-file-modified-sort="1703841103932" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="4">
<a href="./content/cicdworkflows-minimum/posts/code-coverage.html" class="quarto-grid-link">
<div class="quarto-grid-item card h-100 card-left">
<p class="card-img-top">
Expand Down Expand Up @@ -393,7 +393,7 @@ <h2 id="recommended-cicd">Recommended CICD</h2>
</a><p><a href="./content/cicdworkflows-recommend/index.html"></a></p>
<div id="listing-cicdworkflows-recommend" class="quarto-listing quarto-listing-container-grid">
<div class="list grid quarto-listing-cols-3">
<div class="g-col-1" data-index="0" data-categories="Documentation,Links" data-listing-date-sort="1690848000000" data-listing-file-modified-sort="1703840118398" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="2">
<div class="g-col-1" data-index="0" data-categories="Documentation,Links" data-listing-date-sort="1690848000000" data-listing-file-modified-sort="1703841103932" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="2">
<a href="./content/cicdworkflows-recommend/posts/check-links/check-links.html" class="quarto-grid-link">
<div class="quarto-grid-item card h-100 card-left">
<p class="card-img-top">
Expand Down Expand Up @@ -441,7 +441,7 @@ <h2 id="enhanced-cicd">Enhanced CICD</h2>
</a><p><a href="./content/cicdworkflows-enhanced/index.html"></a></p>
<div id="listing-cicdworkflows-enhanced" class="quarto-listing quarto-listing-container-grid">
<div class="list grid quarto-listing-cols-3">
<div class="g-col-1" data-index="0" data-categories="Testing,Documentation,Validation" data-listing-date-sort="1690848000000" data-listing-file-modified-sort="1703840118398" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="1">
<div class="g-col-1" data-index="0" data-categories="Testing,Documentation,Validation" data-listing-date-sort="1690848000000" data-listing-file-modified-sort="1703841103932" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="3">
<a href="./content/cicdworkflows-enhanced/posts/validate/validate.html" class="quarto-grid-link">
<div class="quarto-grid-item card h-100 card-left">
<p class="card-img-top">
Expand Down
Loading

0 comments on commit 2cbb129

Please sign in to comment.