Skip to content

Merge pull request #176 from sabitov-kirill/probability-theory-lec-9-… #124

Merge pull request #176 from sabitov-kirill/probability-theory-lec-9-…

Merge pull request #176 from sabitov-kirill/probability-theory-lec-9-… #124

Workflow file for this run

name: build
on:
push:
branches: [master]
pull_request:
types: [assigned]
jobs:
build:
runs-on: ubuntu-latest
container: texlive/texlive
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Apt update
run: apt-get update
- name: Install misc packages
run: apt-get install -y fonts-inconsolata inkscape
- name: Install jetbrains mono
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/install_manual.sh)"
- name: Remove variable width font
run: rm /github/home/.local/share/fonts/fonts/variable/JetBrainsMono[wght].ttf /github/home/.local/share/fonts/fonts/variable/JetBrainsMono-Italic[wght].ttf
- name: Run build
run: bash build.sh
- name: Set env
run: echo "COMMIT_MSG=Built pdfs $(git rev-parse --short $GITHUB_SHA)" >> $GITHUB_ENV
- name: Remove anything but pdfs
run: |
shopt -s globstar
shopt -s extglob
rm **/*.!(pdf) || true
rm -rf `find -type d -name svg-inkscape` || true
rm -rf `find -type d -name images` || true
shell: "bash"
- name: Commit changes
uses: peaceiris/actions-gh-pages@v3.9.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: pdfs
publish_dir: .
user_name: "github-actions[bot]"
user_email: "github-actions[bot]@users.noreply.github.com"
full_commit_message: ${{ env.COMMIT_MSG }}
keep_files: true