Slides overview 2022 #272
This file contains hidden or 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: Slides overview 2022 | |
on: | |
push: | |
branches: [main] | |
paths: | |
- src/** | |
schedule: | |
- cron: "0 14 * * 5" | |
jobs: | |
build_latex: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Partial Clone | |
shell: bash | |
run: | | |
REPO="https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" | |
git config --global user.email github-actions@github.com | |
git config --global user.name github-actions | |
git clone -q --filter=blob:none --no-checkout --depth=1 --sparse $REPO . | |
git sparse-checkout set src | |
git checkout | |
- uses: addnab/docker-run-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
registry: ghcr.io | |
image: ghcr.io/cpp-review-dune/introductory-review/pandoc:latest | |
options: -v ${{github.workspace}}:/work | |
shell: bash | |
run: | | |
sudo chown -R 33333:33333 /work | |
cd /work | |
export TERM=xterm | |
for d in src/2022-0*; do pandoc ${d}/*.md -t beamer -V lang=es --pdf-engine=lualatex --pdf-engine-opt=-shell-escape -o ${d}.pdf ; done; | |
mkdir -p public && mv src/2022-0*.pdf public | |
- name: Check pdf files | |
run: | | |
find public/ -type f -name "*.pdf" -exec file -- {} + | grep -q ' PDF ' | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: public | |
force_orphan: true | |
publish_branch: gh-pages |