Skip to content

Commit

Permalink
Changed yml with Will's one
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMerSci committed Nov 13, 2023
1 parent cc9b6cd commit 5b97552
Showing 1 changed file with 18 additions and 40 deletions.
58 changes: 18 additions & 40 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,61 +13,39 @@ 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
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: docs
SINGLE_COMMIT: true
SINGLE_COMMIT: true

0 comments on commit 5b97552

Please sign in to comment.