-
Notifications
You must be signed in to change notification settings - Fork 0
139 lines (120 loc) · 5.7 KB
/
compile_tex.yaml
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# To add a file that needs to be compiled, do all the steps marked by (*)
name: Github Actions CI
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v3
# (*) To add a file, add the following section for it
- name: Compile natural language processing summary
uses: xu-cheng/latex-action@v3
with:
root_file: main.tex
working_directory: natural_language_processing
- name: Compile computer vision summary
uses: xu-cheng/latex-action@v3
with:
root_file: main.tex
working_directory: computer_vision
- name: Compile probabilistic artificial intelligence
uses: xu-cheng/latex-action@v3
with:
root_file: main.tex
latexmk_shell_escape: true
working_directory: probabilistic_artificial_intelligence
- name: Compile algorithms lab
uses: xu-cheng/latex-action@v3
with:
root_file: main.tex
working_directory: algorithms_lab
- name: Compile optimization for data science summary
uses: xu-cheng/latex-action@v3
with:
root_file: main.tex
latexmk_shell_escape: true
working_directory: optimization_for_data_science/summary
- name: Compile optimization for data science cheatsheet
uses: xu-cheng/latex-action@v3
with:
root_file: main.tex
latexmk_shell_escape: true
working_directory: optimization_for_data_science/cheatsheet
- name: Compile machine perception summary
uses: xu-cheng/latex-action@v3
with:
root_file: main.tex
latexmk_shell_escape: true
working_directory: machine_perception/summary
- name: Compile machine perception cheatsheet
uses: xu-cheng/latex-action@v3
with:
root_file: main.tex
latexmk_shell_escape: true
working_directory: machine_perception/cheatsheet
- name: Compile computational intelligence lab recap
uses: xu-cheng/latex-action@v3
with:
root_file: main.tex
latexmk_shell_escape: true
working_directory: computational_intelligence_lab/recap
- name: Compile computational intelligence lab summary
uses: xu-cheng/latex-action@v3
with:
root_file: main.tex
latexmk_shell_escape: true
working_directory: computational_intelligence_lab/summary
# (*) To add a file, add the PDF filename to the following
- name: Check PDF files
run: |
file natural_language_processing/main.pdf | grep -q ' PDF '
file computer_vision/main.pdf | grep -q ' PDF '
file probabilistic_artificial_intelligence/main.pdf | grep -q ' PDF '
file algorithms_lab/main.pdf | grep -q ' PDF '
file optimization_for_data_science/summary/main.pdf | grep -q ' PDF '
file optimization_for_data_science/cheatsheet/main.pdf | grep -q ' PDF '
file machine_perception/summary/main.pdf | grep -q ' PDF '
file machine_perception/cheatsheet/main.pdf | grep -q ' PDF '
file computational_intelligence_lab/recap/main.pdf | grep -q ' PDF '
file computational_intelligence_lab/summary/main.pdf | grep -q ' PDF '
- name: Upload to GitHub pages
run: |
git config --global user.name "Cristian Perez Jensen"
git config --global user.email "[email protected]"
mkdir ~/.ssh
chmod 700 ~/.ssh
echo "$DEPLOY_KEY" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
git config --global core.sshCommand "ssh -i ~/.ssh/id_ed25519 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
git clone --depth=1 --branch gh-pages [email protected]:cristianpjensen/eth-cs-notes.git "$GITHUB_WORKSPACE/deploy"
# (*) To add a file, add the following command for that file
cp -f natural_language_processing/main.pdf "$GITHUB_WORKSPACE/deploy/natural_language_processing-summary.pdf"
cp -f computer_vision/main.pdf "$GITHUB_WORKSPACE/deploy/computer_vision-summary.pdf"
cp -f probabilistic_artificial_intelligence/main.pdf "$GITHUB_WORKSPACE/deploy/probabilistic_artificial_intelligence-summary.pdf"
cp -f algorithms_lab/main.pdf "$GITHUB_WORKSPACE/deploy/algorithms_lab-summary.pdf"
cp -f optimization_for_data_science/summary/main.pdf "$GITHUB_WORKSPACE/deploy/optimization_for_data_science-summary.pdf"
cp -f optimization_for_data_science/cheatsheet/main.pdf "$GITHUB_WORKSPACE/deploy/optimization_for_data_science-cheatsheet.pdf"
cp -f machine_perception/summary/main.pdf "$GITHUB_WORKSPACE/deploy/machine_perception-summary.pdf"
cp -f machine_perception/cheatsheet/main.pdf "$GITHUB_WORKSPACE/deploy/machine_perception-cheatsheet.pdf"
cp -f computational_intelligence_lab/recap/main.pdf "$GITHUB_WORKSPACE/deploy/computational_intelligence_lab-recap.pdf"
cp -f computational_intelligence_lab/summary/main.pdf "$GITHUB_WORKSPACE/deploy/computational_intelligence_lab-summary.pdf"
cd "$GITHUB_WORKSPACE/deploy"
# (*) To add a file, add it to the branch
git add natural_language_processing-summary.pdf
git add computer_vision-summary.pdf
git add probabilistic_artificial_intelligence-summary.pdf
git add algorithms_lab-summary.pdf
git add optimization_for_data_science-summary.pdf
git add optimization_for_data_science-cheatsheet.pdf
git add machine_perception-summary.pdf
git add machine_perception-cheatsheet.pdf
git add computational_intelligence_lab-recap.pdf
git add computational_intelligence_lab-summary.pdf
git commit -m "[github actions] deploy"
git push
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}