Merge branch 'main' of github.com:nrdg/2024-ohbm-sz-scp-poster #23
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
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
name: Render and Publish | |
permissions: | |
contents: write | |
pages: write | |
jobs: | |
codespell: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: codespell-project/actions-codespell@master | |
build-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Install SSL | |
uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: libssl-dev | |
- name: Set up R | |
uses: r-lib/actions/setup-r@v1 | |
with: | |
r-version: '4.1.0' | |
pandoc-version: '2.14' | |
- name: Install dependencies | |
run: | | |
install.packages(c("pagedown", "posterdown")) | |
shell: Rscript {0} | |
- name: Build the poster | |
run: | | |
pagedown::chrome_print('poster.Rmd') | |
shell: Rscript {0} | |
- name: Move the html poster | |
run: | | |
mkdir website | |
mv poster.html website/index.html | |
- name: Commit poster PDF | |
uses: EndBug/add-and-commit@v9 # You can change this to use a specific version. | |
with: | |
add: 'poster.pdf' | |
author_name: 'GitHub Actions' | |
message: 'Add poster.pdf at ${{ github.sha }}' | |
- name: Deploy html to gh-pages | |
uses: JamesIves/github-pages-deploy-action@4.1.5 | |
with: | |
branch: gh-pages | |
folder: ${{github.workspace}}/website |