Add license #39
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 and commit PDFs | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Compile LaTeX document | |
uses: xu-cheng/texlive-action/full@v1 | |
with: | |
run: | | |
apk add make | |
make all | |
- name: Commit generated PDFs | |
run: | | |
mkdir -p docs | |
cp lecture-notes.pdf docs/ | |
cp chapters/*.pdf docs/ | |
git add docs/*.pdf | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git commit -m "Generated PDFs" | |
- name: Commit changes | |
uses: ad-m/github-push-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
branch: "pdf-build" | |
force: true |