Skip to content

Add misc notebooks from 2023 #191

Add misc notebooks from 2023

Add misc notebooks from 2023 #191

Workflow file for this run

name: Compile and commit LaTex pdf
on:
push:
branches:
- "*"
- "*/*"
- "!master"
jobs:
get_changed_files:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v1
- name: Get changed files
run: |
git diff-tree --no-commit-id --name-only -r ${{ github.sha }} | grep "\.tex" | sort | uniq > changed-tex-files.txt
cat changed-tex-files.txt
# TODO: Simplify above step, follow up on error:https://github.com/lots0logs/gh-action-get-changed-files/issues/10
# - name: Get changed files
# uses: lots0logs/gh-action-get-changed-files@2.0.6
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload changed-tex-files artifact
uses: actions/upload-artifact@v2
with:
name: changed-tex-files
path: changed-tex-files.txt
- name: Compile LaTeX documents
uses: ./compilers/latex
with:
changed_files: changed-tex-files.txt
compiler: "pdflatex"
args: "-file-line-error -interaction=nonstopmode"
- name: Compile Markdown and HTML with pandoc documents
continue-on-error: true
uses: ./compilers/pandoc
with:
changed_files: changed-tex-files.txt
- name: Download all artifacts
uses: actions/download-artifact@v2
- name: Commit files
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git diff --name-only
git add *.pdf
git add '*.md'
git add *.html
git commit -m "Add changed files" || echo "Nothing to update"
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ steps.extract_branch.outputs.branch }}