Skip to content

Commit

Permalink
Merge pull request #13 from phuse-org/tidy
Browse files Browse the repository at this point in the history
Update website with Dinakar's new content
  • Loading branch information
epijim authored Dec 15, 2023
2 parents 26e2654 + d782ba6 commit a92677a
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 34 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ on:
- '**.scss'

jobs:
links:
name: Links
uses: phuse-org/devops-toolkit/.github/workflows/urlchecker.yml@main
publish:
name: Build & Deploy Site
needs: links
runs-on: ubuntu-latest
container:
image: rocker/tidyverse:latest
Expand Down
27 changes: 23 additions & 4 deletions content/cicdworkflows-minimum/posts/code-coverage.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ toc: true
:::{.callout-note style="margin-top: 0rem;" collapse="false"}
## About the gh-action

**Example of use:** [admiral R package](https://github.com/pharmaverse/admiralci#code-coverage)
**Example of use:** [falcon R package](https://github.com/pharmaverse/falcon/blob/use-phuse-cicd/.github/workflows/phuse-basics.yml)

**Expected output:** Badge (![Code
Coverage](https://github.com/pharmaverse/admiralci/actions/workflows/code-coverage.yml/badge.svg)) or change pipeline depending on reported code coverage.
Expand All @@ -39,10 +39,29 @@ setting up tests with test that.
You can call this action via adding a call to this job in a github action. A minimal example
that runs this on commits to master is:

> ..... Have a 'recomended' yaml like admiral does with common?
Then can link to that line of code in that gh-action file?
```bash
name: Code coverage
# sourced from phuse-org/devops-toolkit

> ....... How do the badges work with this one? The docs seem to contradict what is present in the admiral R package.
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
branches:
- main
push:
branches:
- main
workflow_dispatch:

jobs:
coverage:
name: Code Coverage
uses: phuse-org/devops-toolkit/.github/workflows/test-coverage.yml@main
```

## The deets

Expand Down
7 changes: 2 additions & 5 deletions content/cicdworkflows-minimum/posts/pkgdown.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ toc: true
:::{.callout-note style="margin-top: 0rem;" collapse="false"}
## About the gh-action

**Example of use:** [teal R package](https://github.com/insightsengineering/teal/blob/main/.github/workflows/docs.yaml)
**Example of use:** [falcon R package](https://github.com/pharmaverse/falcon/blob/use-phuse-cicd/.github/workflows/phuse-basics.yml)

**Expected output:** Generate and deploy to gh-pages versioned documentation, and upload copy of documentation to release.
:::
Expand Down Expand Up @@ -47,11 +47,9 @@ on:
jobs:
docs:
name: Pkgdown Docs 📚
uses: insightsengineering/r.pkg.template/.github/workflows/pkgdown.yaml@main
uses: phuse-org/devops-toolkit/.github/workflows/pkgdown.yml@main
secrets:
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
with:
default-landing-page: latest-tag
```

## The deets
Expand All @@ -60,4 +58,3 @@ If you have built docs locally in the past, you are probably aware that your git
of each piece version of every plot and image you have used in your documentation. This `gh-action` will help you avoid that, by
placing the versioned documentation into an orphan branch. Helping to keep your docs (a built artefact) seperate from your source code.

The `gh-action` is well documented in-line, [and stored at this location](https://github.com/insightsengineering/r.pkg.template/blob/main/.github/workflows/pkgdown.yaml).
29 changes: 16 additions & 13 deletions content/cicdworkflows-minimum/posts/r-cmd-check/r-cmd-check.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ toc: true
:::{.callout-note style="margin-top: 0rem;" collapse="false"}
## About the gh-action

[**Link to `gh-action`**](https://github.com/pharmaverse/admiralci/blob/main/.github/workflows/r-cmd-check.yml)

**Example of use:** ADD
**Example of use:** [falcon R package](https://github.com/pharmaverse/falcon/blob/use-phuse-cicd/.github/workflows/phuse-basics.yml)

**Expected output:** Fail the pipeline if `R CMD Check` fails.
:::
Expand All @@ -34,28 +32,33 @@ Below is an example of using this `gh-action` whenever someone tries to make PR


```bash
---
name: R CMD Check
name: Run R-CMD-check
# sourced from phuse-org/devops-toolkit

on:
push:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
branches:
- main
- devel
pull_request:
push:
branches:
- main
- devel
workflow_dispatch:

jobs:
check:
name: Check
uses: pharmaverse/admiralci/.github/workflows/r-cmd-check.yml@main
if: github.event_name == 'pull_request'
links:
name: Links
uses: phuse-org/devops-toolkit/.github/workflows/R-CMD-check.yml@main
```

## The deets



## Advanced use

TODO: Add here how to also run against pharmaverse's r-universe latest & the latest release of PPM packages.
25 changes: 14 additions & 11 deletions content/cicdworkflows-recommend/posts/check-links/check-links.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ toc: true
:::{.callout-note style="margin-top: 0rem;" collapse="false"}
## About the gh-action

**Example of use:** [admiral R package](https://github.com/pharmaverse/admiralci#links)
**Example of use:** [falcon R package](https://github.com/pharmaverse/falcon/blob/use-phuse-cicd/.github/workflows/phuse-basics.yml)

**Expected output:** Fail the pipeline if a link is broken in your repo.
**Expected output:** Fail the pipeline if a link is broken in your repo (**CHECK IT DOES THIS**)
:::

## Why should I use this?

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.
These links can stop working over time - and often you won't know till a user flags your links are broken.

This `gh-action` lets you stay on top of broken links, by actively scanning for them.

Expand All @@ -31,24 +31,27 @@ Below is an example of using this `gh-action` whenever someone tries to make PR


```bash
---
name: Docs 📚
name: Check URLs in docs 📚
# sourced from phuse-org/devops-toolkit

on:
push:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
branches:
- main
- devel
pull_request:
push:
branches:
- main
- devel
workflow_dispatch:

jobs:
links:
name: Links
uses: pharmaverse/admiralci/.github/workflows/links.yml@main
if: github.event_name == 'pull_request'
uses: phuse-org/devops-toolkit/.github/workflows/urlchecker.yml@main
```

## The deets
Expand Down
1 change: 0 additions & 1 deletion index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ A recomended plan for success in implenting CICD on your project is to:

- [Read this post](post/posts/gh-actions.html) on the general anatomy of a `gh-action`
- Browse our recomended `gh-action`'s below
- Review this case study of CICD is used in `admiral`
- Implement CICD on your git repo!

We've also collected togther [this list of external learning resources](post/posts/external-resources.html).
Expand Down

0 comments on commit a92677a

Please sign in to comment.