Add dummies #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Bookdown to Netlify | |
on: | |
push: | |
branches: | |
- main # Trigger the workflow on pushes to the main branch | |
pull_request: | |
branches: | |
- main # Optional: Trigger on pull requests to main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up R | |
uses: r-lib/actions/setup-r@v2 | |
- name: Install R dependencies with GitHub PAT | |
uses: r-lib/actions/setup-r-dependencies@v2 | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build bookdown site | |
run: | | |
Rscript -e 'bookdown::render_book("index.Rmd", "bookdown::gitbook")' | |
- name: Deploy to Netlify | |
uses: nwtgck/actions-netlify@v1.2.3 | |
with: | |
publish-dir: ./_book # Directory where the book is rendered | |
production-deploy: true | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} |