Skip to content

Causation revisions week 1 #506

Causation revisions week 1

Causation revisions week 1 #506

on:
workflow_dispatch:
pull_request:
branches: main
name: "Publish to stat20-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 partial site
quarto run partial-render.ts
# publish rendered site to stat20-pr.netlify.app
quarto publish netlify --profile partial-site --no-render --id 4f93185f-50a9-491c-b86f-3f8e51eb3ae9