Skip to content

Build RMarkdown document #8

Build RMarkdown document

Build RMarkdown document #8

Workflow file for this run

name: Build RMarkdown document
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
build_rmarkdown:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v3
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-tinytex@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
packages: |
any::ggplot2
any::ggpubr
any::dplyr
any::rlang
any::readr
any::flextable
any::officer
any::here
any::rmarkdown
any::bookdown
any::stringr
- name: Render Book
run: Rscript -e 'rmarkdown::render("congogbv.Rmd",encoding="UTF-8")'
- name: Rename file
run: mv congogbv.pdf "Sexual violence conflict and female empowerment ${{ steps.date.outputs.date }}.pdf"
- name: Release
uses: ncipollo/release-action@v1
with:
artifacts: "Sexual violence conflict and female empowerment ${{ steps.date.outputs.date }}.pdf"
bodyFile: .github/workflows/release_info.md