From 5ff20c36df88d284fad5f5e1f345217bb3673974 Mon Sep 17 00:00:00 2001 From: Jenny Bryan Date: Mon, 6 Dec 2021 13:48:50 -0800 Subject: [PATCH 1/4] Run pkgdown for published releases and on workflow_dispatch Closes #450 --- examples/pkgdown-pak.yaml | 4 +++- examples/pkgdown.yaml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/pkgdown-pak.yaml b/examples/pkgdown-pak.yaml index 59ae30874..63cbb18a1 100644 --- a/examples/pkgdown-pak.yaml +++ b/examples/pkgdown-pak.yaml @@ -3,7 +3,9 @@ on: push: branches: [main, master] - tags: ['*'] + release: + types: [published] + workflow_dispatch: name: pkgdown diff --git a/examples/pkgdown.yaml b/examples/pkgdown.yaml index 59ae30874..63cbb18a1 100644 --- a/examples/pkgdown.yaml +++ b/examples/pkgdown.yaml @@ -3,7 +3,9 @@ on: push: branches: [main, master] - tags: ['*'] + release: + types: [published] + workflow_dispatch: name: pkgdown From b0b71ef564f1421235fd2c96f5ae48bbc9e86a97 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 6 Dec 2021 21:50:22 +0000 Subject: [PATCH 2/4] Re-build README.Rmd --- examples/README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/README.md b/examples/README.md index 861f93482..7478da6fc 100644 --- a/examples/README.md +++ b/examples/README.md @@ -462,7 +462,8 @@ jobs: `usethis::use_github_action("render-rmarkdown")` This example automatically re-builds any Rmarkdown file in the -repository whenever it changes and commits the results. +repository whenever it changes and commits the results to the master +branch. ``` yaml # Workflow derived from https://github.com/r-lib/actions/tree/master/examples @@ -517,7 +518,9 @@ Pages](https://pages.github.com/). on: push: branches: [main, master] - tags: ['*'] + release: + types: [published] + workflow_dispatch: name: pkgdown From 6d7dff1d71417401a7384d470aa9711f894da286 Mon Sep 17 00:00:00 2001 From: Jenny Bryan Date: Tue, 7 Dec 2021 09:50:39 -0800 Subject: [PATCH 3/4] Add a sentence about `workflow_dispatch` --- examples/README.Rmd | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/README.Rmd b/examples/README.Rmd index 64da32fa7..defd114b3 100644 --- a/examples/README.Rmd +++ b/examples/README.Rmd @@ -158,6 +158,7 @@ print_yaml("render-rmarkdown.yaml") This example builds a [pkgdown] site for a repository and pushes the built package to [GitHub Pages]. +The inclusion of [`workflow_dispatch`](https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#workflow_dispatch) means the workflow can be [run manually, from the browser](https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow), or [triggered via the GitHub REST API](https://docs.github.com/en/rest/reference/actions/#create-a-workflow-dispatch-event). ```{r echo = FALSE, results = "asis"} print_yaml("pkgdown.yaml") From abac6a3920312b996d743e74214e34990fc0e1c1 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 7 Dec 2021 17:52:04 +0000 Subject: [PATCH 4/4] Re-build README.Rmd --- examples/README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/README.md b/examples/README.md index 7478da6fc..a226a0620 100644 --- a/examples/README.md +++ b/examples/README.md @@ -510,7 +510,12 @@ jobs: This example builds a [pkgdown](https://pkgdown.r-lib.org/) site for a repository and pushes the built package to [GitHub -Pages](https://pages.github.com/). +Pages](https://pages.github.com/). The inclusion of +[`workflow_dispatch`](https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#workflow_dispatch) +means the workflow can be [run manually, from the +browser](https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow), +or [triggered via the GitHub REST +API](https://docs.github.com/en/rest/reference/actions/#create-a-workflow-dispatch-event). ``` yaml # Workflow derived from https://github.com/r-lib/actions/tree/master/examples