Skip to content

gh-action from r-pkgs book #54

gh-action from r-pkgs book

gh-action from r-pkgs book #54

# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch:
name: render
jobs:
render:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: render-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Generate Locales used in Package within
run: |
sudo locale-gen it_IT.UTF-8
sudo locale-gen pl_PL.UTF-8
sudo locale-gen pt_BR.UTF-8
sudo locale-gen en_GB.UTF-8
sudo locale-gen fr_FR
sudo locale-gen en_CA
- name: Configure Git user
run: |
git config --global user.name "$GITHUB_ACTOR"
git config --global user.email "[email protected]"
- uses: actions/checkout@v3
- uses: quarto-dev/quarto-actions/setup@v2
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
- name: Render book
run: quarto render
- name: Deploy to GitHub Pages
id: gh-pages-deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: _book