Skip to content

Commit ee45686

Browse files
authored
Merge pull request #451 from r-lib/update-event-triggers-for-pkgdown
2 parents cc75f2c + abac6a3 commit ee45686

File tree

4 files changed

+18
-5
lines changed

4 files changed

+18
-5
lines changed

examples/README.Rmd

+1
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ print_yaml("render-rmarkdown.yaml")
158158

159159
This example builds a [pkgdown] site for a repository and pushes the built package
160160
to [GitHub Pages].
161+
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).
161162

162163
```{r echo = FALSE, results = "asis"}
163164
print_yaml("pkgdown.yaml")

examples/README.md

+11-3
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,8 @@ jobs:
462462
`usethis::use_github_action("render-rmarkdown")`
463463

464464
This example automatically re-builds any Rmarkdown file in the
465-
repository whenever it changes and commits the results.
465+
repository whenever it changes and commits the results to the master
466+
branch.
466467

467468
``` yaml
468469
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
@@ -509,15 +510,22 @@ jobs:
509510

510511
This example builds a [pkgdown](https://pkgdown.r-lib.org/) site for a
511512
repository and pushes the built package to [GitHub
512-
Pages](https://pages.github.com/).
513+
Pages](https://pages.github.com/). The inclusion of
514+
[`workflow_dispatch`](https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#workflow_dispatch)
515+
means the workflow can be [run manually, from the
516+
browser](https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow),
517+
or [triggered via the GitHub REST
518+
API](https://docs.github.com/en/rest/reference/actions/#create-a-workflow-dispatch-event).
513519

514520
``` yaml
515521
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
516522
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
517523
on:
518524
push:
519525
branches: [main, master]
520-
tags: ['*']
526+
release:
527+
types: [published]
528+
workflow_dispatch:
521529
522530
name: pkgdown
523531

examples/pkgdown-pak.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
on:
44
push:
55
branches: [main, master]
6-
tags: ['*']
6+
release:
7+
types: [published]
8+
workflow_dispatch:
79

810
name: pkgdown
911

examples/pkgdown.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
on:
44
push:
55
branches: [main, master]
6-
tags: ['*']
6+
release:
7+
types: [published]
8+
workflow_dispatch:
79

810
name: pkgdown
911

0 commit comments

Comments
 (0)