-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (41 loc) · 1.46 KB
/
generatepdf.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
48
49
name: Genera PDF
on:
push:
branches: [ main ]
paths:
- 'slide/*.*'
- '.github/workflows/generatepdf.yml'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: generate pdf
run: |
cd slide
cp Corso_AI.md Corso_AI-backup.md
sed -i "s/%date%/$(date +'%Y-%m-%d')/g" Corso_AI.md
sed -i "s/%time%/$(date +'%H:%M')/g" Corso_AI.md
npx @marp-team/marp-cli@latest Corso_AI.md --pdf --allow-local-files
rm Corso_AI.md
mv Corso_AI-backup.md Corso_AI.md
cp Corso_AI_Coder.md Corso_AI_Coder-backup.md
sed -i "s/%date%/$(date +'%Y-%m-%d')/g" Corso_AI_Coder.md
sed -i "s/%time%/$(date +'%H:%M')/g" Corso_AI_Coder.md
npx @marp-team/marp-cli@latest Corso_AI_Coder.md --pdf --allow-local-files
rm Corso_AI_Coder.md
mv Corso_AI_Coder-backup.md Corso_AI_Coder.md
cp AI_Positive.md AI_Positive-backup.md
sed -i "s/%date%/$(date +'%Y-%m-%d')/g" AI_Positive.md
sed -i "s/%time%/$(date +'%H:%M')/g" AI_Positive.md
npx @marp-team/marp-cli@latest AI_Positive.md --pdf --allow-local-files
rm AI_Positive.md
mv AI_Positive-backup.md AI_Positive.md
- name: commit & push
run: |
git add -A
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "update slides"
git push