Merge pull request #3 from grady/v3 #60
Workflow file for this run
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 Submission Files | |
on: [push] | |
jobs: | |
sweave-latex: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: r-lib/actions/setup-r@v2 | |
- name: Print R version | |
run: version | |
shell: Rscript {0} | |
- uses: r-lib/actions/setup-tinytex@v2 | |
- name: Print pdflatex version | |
run: pdflatex --version | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
- name: Print R packages | |
run: 'installed.packages()[,c("Package", "Version")]' | |
shell: Rscript {0} | |
- uses: actions/cache@v3 | |
with: | |
key: knitr-cache | |
path: cache | |
- name: Render manuscript | |
run: knitr::rnw2pdf("dentlinger.Rnw", compiler="pdflatex", clean=FALSE) | |
shell: Rscript {0} | |
- name: Print dir listing | |
run: ls -l | |
- name: Store artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: submission-files | |
path: | | |
dentlinger.log | |
dentlinger.tex | |
dentlinger.bbl | |
dentlinger.pdf | |
turtles.bib | |
sn-basic.bst | |
sn-jnl.cls | |
figure/*.pdf | |
- name: Create pages directory | |
run: | | |
mkdir _site | |
ln -s -r -t _site figure dentlinger.pdf | |
ls -a -l -R -L _site | |
- uses: jayanta525/github-pages-directory-listing@v3.0.0 | |
with: | |
FOLDER: _site/figure | |
- uses: actions/upload-pages-artifact@v2 | |
deploy: | |
needs: sweave-latex | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/configure-pages@v3 | |
- uses: actions/deploy-pages@v2 | |
id: deployment | |