Skip to content

Genera PDF

Genera PDF #5

Workflow file for this run

name: Genera PDF
on:
push:
branches: [ main ]
paths:
- 'slide/*.*'
- '.github/workflows/generatepdf.yml'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: generate pdf
run: |
cd slide
cp AI_Generation.md AI_Generation-backup.md
sed -i "s/%date%/$(date +'%Y-%m-%d')/g" AI_Generation.md
sed -i "s/%time%/$(date +'%H:%M')/g" AI_Generation.md
npx @marp-team/marp-cli@latest AI_Generation.md --pdf --allow-local-files
rm AI_Generation.md
mv AI_Generation-backup.md AI_Generation.md
cp AI_Generation-en.md AI_Generation-en-backup.md
sed -i "s/%date%/$(date +'%Y-%m-%d')/g" AI_Generation-en.md
sed -i "s/%time%/$(date +'%H:%M')/g" AI_Generation-en.md
npx @marp-team/marp-cli@latest AI_Generation-en.md --pdf --allow-local-files
rm AI_Generation-en.md
mv AI_Generation-en-backup.md AI_Generation-en.md
- name: commit & push
run: |
git add -A
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit -m "update slides"
git push