commit message updated #3
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: Build and deploy site | |
on: | |
workflow_dispatch: | |
push: | |
branches: main | |
jobs: | |
build-deploy: | |
if: "contains(github.event.head_commit.message, 'Render PDF')" | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set up Quarto | |
uses: quarto-dev/quarto-actions/setup@v2 | |
with: | |
tinytex: true | |
- name: Set up R | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
- name: Install R packages | |
run: | | |
install.packages(c("knitr", "rmarkdown", "quarto", "stringr")) | |
shell: Rscript {0} | |
- name: Render Quarto Project | |
uses: quarto-dev/quarto-actions/render@v2 | |
- name: Deploy 🚀 | |
if: github.event_name != 'pull_request' | |
uses: JamesIves/github-pages-deploy-action@v4.4.3 | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: _site # The folder the action should deploy. | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |