Skip to content

Render and deploy Book to Netlify #36

Render and deploy Book to Netlify

Render and deploy Book to Netlify #36

Workflow file for this run

on:
push:
branches:
- 'traducao-pt-2ed'
# pull_request:
# branches: main
# to be able to trigger a manual build
workflow_dispatch:
# schedule:
# # run every day at 11 PM
# - cron: '0 23 * * *'
name: Render and deploy Book to Netlify
jobs:
build-deploy:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
ref: traducao-pt-2ed
- name: Install Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
# To install LaTeX to build PDF book
tinytex: true
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
- name: "Instalar o pacote dados"
run: |
Rscript -e "install.packages('remotes'); remotes::install_github('cienciadedatos/dados')"
- name: Render book to all format
# Add any command line argument needed
run: |
quarto render
- name: Publish to GitHub Pages (and render)
uses: quarto-dev/quarto-actions/publish@v2
with:
render: false
target: gh-pages
path: "_book/"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # this secret is always available for github actions