Skip to content

Council Representation Update #12

Council Representation Update

Council Representation Update #12

Workflow file for this run

name: LaTeX CI
on:
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/xu-cheng/texlive-full:latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Mark workspace safe for git
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Determine changed documents
id: changed
shell: bash
run: |
# Fetch master so we have the ref to diff against
git fetch origin master --depth=1
CHANGED=$(git diff --name-only origin/master...HEAD)
BUILD_BYLAWS=false
BUILD_POLICIES=false
BUILD_BOARD=false
if echo "$CHANGED" | grep -Eq '^(logo\.png|mathsoc\.cls|mathsoc\.sty|title\.tex)$'; then
BUILD_BYLAWS=true
BUILD_POLICIES=true
BUILD_BOARD=true
fi
if echo "$CHANGED" | grep -q '^bylaws/'; then
BUILD_BYLAWS=true
fi
if echo "$CHANGED" | grep -q '^policies/'; then
BUILD_POLICIES=true
fi
if echo "$CHANGED" | grep -q '^board-procedures/'; then
BUILD_BOARD=true
fi
echo "bylaws=$BUILD_BYLAWS" >> $GITHUB_OUTPUT
echo "policies=$BUILD_POLICIES" >> $GITHUB_OUTPUT
echo "board=$BUILD_BOARD" >> $GITHUB_OUTPUT
- name: Build bylaws
if: steps.changed.outputs.bylaws == 'true'
run: make -C bylaws public
- name: Build policies
if: steps.changed.outputs.policies == 'true'
run: make -C policies public
- name: Build board-procedures
if: steps.changed.outputs.board == 'true'
run: make -C board-procedures public