Skip to content

Sam causal

Sam causal #370

on:
workflow_dispatch:
pull_request:
branches: main
name: "Publish to stat20staff-pr.netlify.app"
jobs:
publish:
runs-on: ubuntu-latest
steps:
# for accessing this repo's assets in the container
- name: Check out the repo
uses: actions/checkout@v3
# run the container, attaching this repo as a working directory
- name: Run the build process with Docker
uses: addnab/docker-run-action@v3
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
with:
image: stat20/stat20-docker:latest
options: -v ${{ github.workspace }}:/home/rstudio/stat20 -e NETLIFY_AUTH_TOKEN=${{ secrets.NETLIFY_AUTH_TOKEN }}
shell: bash
run: |
# exit if any command returns non-zero exit
set -e
# execute from the textbook
cd /home/rstudio/stat20/
# render staff-site
quarto run render-staff-site.ts
# upload rendered staf site to to stat20staff.netlify.app
quarto publish netlify --profile staff-site --no-render --id 3f1e6a82-2bfc-4ac3-94f8-73f78436dd2a