Skip to content

Commit

Permalink
switch from git commit docx/pdf to uploading at gh action artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
kelliemac authored Mar 6, 2024
1 parent d4b70b2 commit 0924038
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/render-visc-empty-skeleton-rmd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
workflow_dispatch:
pull_request:
branches: [ master, main, develop ]
push:
branches: [ gh-action-render-skeleton-rmd ]

name: render-visc-empty-skeleton-rmd

Expand Down Expand Up @@ -44,12 +46,18 @@ jobs:
run: |
Rscript -e 'devtools::install()'
- name: Render visc_empty Rmarkdown skeleton report and Commit Results
- name: Render visc_empty Rmarkdown skeleton report
run: |
Rscript -e 'rmarkdown::render("inst/rmarkdown/templates/visc_empty/skeleton/skeleton.Rmd", output_format="all")'
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git add inst/rmarkdown/templates/visc_empty/skeleton/skeleton.pdf
git add inst/rmarkdown/templates/visc_empty/skeleton/skeleton.docx
git commit -m 'Re-build visc_empty skeleton Rmd' || echo "No changes to commit"
git push origin || echo "No changes to commit"
- name: Upload skeleton.pdf as GitHub action artifact
uses: actions/upload-artifact@v4
with:
name: visc-empty-skeleton.pdf
path: inst/rmarkdown/templates/visc_empty/skeleton/skeleton.pdf

- name: Upload skeleton.docx as GitHub action artifact
uses: actions/upload-artifact@v4
with:
name: visc-empty-skeleton.docx
path: inst/rmarkdown/templates/visc_empty/skeleton/skeleton.docx

0 comments on commit 0924038

Please sign in to comment.