From 5b975524bd11684cb2080c008148d37018e3ec26 Mon Sep 17 00:00:00 2001 From: BenMerSci Date: Mon, 13 Nov 2023 11:24:38 -0500 Subject: [PATCH] Changed yml with Will's one --- .github/workflows/build.yml | 58 ++++++++++++------------------------- 1 file changed, 18 insertions(+), 40 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0d9c19d..a574eed 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,56 +13,34 @@ jobs: Build_deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master - - uses: r-lib/actions/setup-pandoc@v1 + - uses: actions/checkout@v3 + + - uses: r-lib/actions/setup-pandoc@v2 with: - pandoc-version: '2.7.3' - - uses: r-lib/actions/setup-r@v1 + pandoc-version: '2.17.1' + + - name: Install R + uses: r-lib/actions/setup-r@v2 with: - r-version: '3.6.0' - - - name: Python 3.6 - uses: actions/setup-python@v1 + r-version: '4.2.0' + use-public-rspm: true + - uses: r-lib/actions/setup-renv@v2 with: - python-version: '3.6' - - - name: Install pandoc filters - run: | - python -m pip install --upgrade pip - pip install pandoc-fignos pandoc-eqnos pandoc-tablenos pandoc-secnos pandoc-xnos - which pandoc pandoc-fignos pandoc-eqnos pandoc-tablenos pandoc-secnos pandoc-xnos - - - name: Install LaTeX - run: | - sudo apt-get install texlive-latex-base - sudo apt-get install texlive-fonts-recommended - sudo apt-get install texlive-fonts-extra - sudo apt-get install texlive-latex-extra + cache-version: 1 - - name: Install system dependencies - if: runner.os == 'Linux' - env: - RHUB_PLATFORM: linux-x86_64-ubuntu-gcc - run: | - sudo apt-get install libpoppler-cpp-dev - sudo apt-get install libcurl4-openssl-dev - sudo apt-get install libglu1-mesa-dev - sudo apt-get install libmagick++-dev - - - name: Install R dependencies - run: Rscript -e "install.packages(c('glue', 'tidyverse', 'readr', 'rmarkdown', 'pagedown', 'rorcid', 'rcrossref'))" - - - name: Build html + - name: Render html run: Rscript -e "rmarkdown::render('index.Rmd')" + env: + ORCID_TOKEN: ${{ secrets.ORCID_TOKEN }} - - name: Build pdf - run: Rscript -e "pagedown::chrome_print(input = 'index.html', output = 'index.pdf')" + - name: Render pdf + run: Rscript -e "pagedown::chrome_print(input = 'index.html', output = 'index.pdf', wait = 5)" - name: Prepare deployment run: | mkdir docs mv index.html docs/index.html - mv index.pdf docs/BenMerSci.pdf + mv index.pdf docs/WillianVieira.pdf - name: Deploy gh_pages uses: JamesIves/github-pages-deploy-action@releases/v3 @@ -70,4 +48,4 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH: gh-pages FOLDER: docs - SINGLE_COMMIT: true + SINGLE_COMMIT: true \ No newline at end of file