Skip to content

Commit

Permalink
add render workflows (#744)
Browse files Browse the repository at this point in the history
  • Loading branch information
seabbs authored Aug 14, 2024
1 parent d803f1f commit 6eb4cd5
Show file tree
Hide file tree
Showing 4 changed files with 248 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/render-EpiNow2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
paths:
- 'vignettes/EpiNow2.Rmd.orig'
branches: [main]
schedule:
- cron: '0 0 1 * *'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

name: render-EpiNow2

jobs:
EpiNow2:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: local::.

- name: Render vignette
run: |
setwd("vignettes")
knitr::knit(
"EpiNow2.Rmd.orig",
"EpiNow2.Rmd"
)
shell: Rscript {0}

- name: Upload vignette as an artifact
uses: actions/upload-artifact@v4
with:
name: vignettes
path: vignettes

- name: Create Pull Request
if: github.ref == 'refs/heads/main'
uses: peter-evans/create-pull-request@v6
with:
commit-message: "Automatic Vignette update"
title: "Update EpiNow2 vignette"
body: "This is an automated pull request to update the EpiNow2 vignette."
branch: "update-EpiNow2-${{ github.run_number }}"
labels: "documentation"
add-paths: |
vignettes
token: ${{ secrets.GITHUB_TOKEN }}
62 changes: 62 additions & 0 deletions .github/workflows/render-epinow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
paths:
- 'vignettes/epinow.Rmd.orig'
branches: [main]
schedule:
- cron: '0 0 1 * *'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

name: render-epinow

jobs:
epinow:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: local::.

- name: Render vignette
run: |
setwd("vignettes")
knitr::knit(
"epinow.Rmd.orig",
"epinow.Rmd"
)
shell: Rscript {0}

- name: Upload vignette as an artifact
uses: actions/upload-artifact@v4
with:
name: vignettes
path: vignettes

- name: Create Pull Request
if: github.ref == 'refs/heads/main'
uses: peter-evans/create-pull-request@v6
with:
commit-message: "Automatic Vignette update"
title: "Update epinow vignette"
body: "This is an automated pull request to update the epinow vignette."
branch: "update-epinow-${{ github.run_number }}"
labels: "documentation"
add-paths: |
vignettes
token: ${{ secrets.GITHUB_TOKEN }}
62 changes: 62 additions & 0 deletions .github/workflows/render-estimate_infections_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
paths:
- 'vignettes/estimate_infections_options.Rmd.orig'
branches: [main]
schedule:
- cron: '0 0 1 * *'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

name: render-estimate_infections_options

jobs:
EpiNow2:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: local::.

- name: Render vignette
run: |
setwd("vignettes")
knitr::knit(
"estimate_infections_options.Rmd.orig",
"estimate_infections_options.Rmd"
)
shell: Rscript {0}

- name: Upload vignette as an artifact
uses: actions/upload-artifact@v4
with:
name: vignettes
path: vignettes

- name: Create Pull Request
if: github.ref == 'refs/heads/main'
uses: peter-evans/create-pull-request@v6
with:
commit-message: "Automatic Vignette update"
title: "Update estimate_infections_options vignette"
body: "This is an automated pull request to update the estimate_infections_options vignette."
branch: "update-estimate_infections_options-${{ github.run_number }}"
labels: "documentation"
add-paths: |
vignettes
token: ${{ secrets.GITHUB_TOKEN }}
62 changes: 62 additions & 0 deletions .github/workflows/render-estimate_infections_workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
paths:
- 'vignettes/estimate_infections_workflow.Rmd.orig'
branches: [main]
schedule:
- cron: '0 0 1 * *'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

name: render-estimate_infections_workflow

jobs:
EpiNow2:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: local::.

- name: Render vignette
run: |
setwd("vignettes")
knitr::knit(
"estimate_infections_workflow.Rmd.orig",
"estimate_infections_workflow.Rmd"
)
shell: Rscript {0}

- name: Upload vignette as an artifact
uses: actions/upload-artifact@v4
with:
name: vignettes
path: vignettes

- name: Create Pull Request
if: github.ref == 'refs/heads/main'
uses: peter-evans/create-pull-request@v6
with:
commit-message: "Automatic Vignette update"
title: "Update estimate_infections_workflow vignette"
body: "This is an automated pull request to update the estimate_infections_workflow vignette."
branch: "update-estimate_infections_workflow-${{ github.run_number }}"
labels: "documentation"
add-paths: |
vignettes
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 6eb4cd5

Please sign in to comment.