Skip to content

Merge pull request #142 from r-devel/binod-weblate-translate #183

Merge pull request #142 from r-devel/binod-weblate-translate

Merge pull request #142 from r-devel/binod-weblate-translate #183

on:
push:
branches:
- main
name: renderbook
jobs:
bookdown:
name: Render-Book
runs-on: macOS-latest
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-tinytex@v2
- name: Install rmarkdown
run: Rscript -e 'install.packages(c("rmarkdown","bookdown"))'
- name: Render HTML
run: Rscript -e 'bookdown::render_book("index.Rmd", "bookdown::gitbook")'
- name: Render PDF
run: Rscript -e 'bookdown::render_book("index.Rmd", "bookdown::pdf_book")'
- name: Render ePub
run: Rscript -e 'bookdown::render_book("index.Rmd", "bookdown::epub_book")'
- uses: actions/upload-artifact@v3
with:
name: docs
path: docs/
# Need to first create an empty gh-pages branch
# see https://pkgdown.r-lib.org/reference/deploy_site_github.html
# and also add secrets for a GH_PAT and EMAIL to the repository
# gh-action from Cecilapp/GitHub-Pages-deploy
checkout-and-deploy:
runs-on: ubuntu-latest
needs: bookdown
steps:
- name: Checkout
uses: actions/checkout@main
- name: Download artifact
uses: actions/download-artifact@v1.0.0
with:
# Artifact name
name: docs # optional
# Destination path
path: docs # optional
- name: Deploy to GitHub Pages
uses: Cecilapp/GitHub-Pages-deploy@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
build_dir: docs/ # "_site/" by default
email: ${{ secrets.EMAIL }} # must be a verified email