Merge pull request #176 from sabitov-kirill/probability-theory-lec-9-… #124
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 | |
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/[email protected] | |
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 |