-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (42 loc) · 1.39 KB
/
slides.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Compiling-TeX-Slides
on:
push:
branches:
- main
- 3-slides
- 3-final-slides
- adds-branch-name
jobs:
build:
if: "!contains(github.event.head_commit.message, '[skip-slides]') && !contains(github.event.head_commit.message, '[skip-all]')"
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v3
- name: Compile Slides
uses: xu-cheng/latex-action@v2
with:
root_file: main.tex
working_directory: slides/
- name: Check pdf files
run: |
file slides/main.pdf | grep -q ' PDF '
- name: Upload
run: |
# configure git
git config --global user.name "mxochicale"
git config --global user.email "[email protected]"
# setup ssh
mkdir ~/.ssh
chmod 700 ~/.ssh
echo "$DEPLOY_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
git config --global core.sshCommand "ssh -i ~/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
git clone --depth=1 --branch pdfs [email protected]:air4children/critter-hri2023.git "$GITHUB_WORKSPACE/deploy"
cp -f slides/main.pdf "$GITHUB_WORKSPACE/deploy/slides.pdf"
cd "$GITHUB_WORKSPACE/deploy"
git add slides.pdf
git commit -m "latex-action deploy"
git push
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}