Merge pull request #7 from matteobaccan/imgbot #17
This file contains 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: Genera PDF | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- 'intro/*.*' | |
- 'intro/assets/*.*' | |
- 'intro2/*.*' | |
- 'intro2/assets/*.*' | |
- '.github/workflows/generatepdf.yml' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: generate pdf Intro | |
run: | | |
cd intro | |
cp intro.md intro-backup.md | |
sed -i "s/%date%/$(date +'%Y-%m-%d')/g" intro.md | |
sed -i "s/%time%/$(date +'%H:%M')/g" intro.md | |
npx @marp-team/marp-cli@latest intro.md --pdf --allow-local-files | |
rm intro.md | |
mv intro-backup.md intro.md | |
- name: generate pdf Intro2 | |
run: | | |
cd intro2 | |
cp intro2.md intro2-backup.md | |
sed -i "s/%date%/$(date +'%Y-%m-%d')/g" intro2.md | |
sed -i "s/%time%/$(date +'%H:%M')/g" intro2.md | |
npx @marp-team/marp-cli@latest intro2.md --pdf --allow-local-files | |
rm intro2.md | |
mv intro2-backup.md intro2.md | |
- name: generate pdf storia | |
run: | | |
cd storia | |
cp storia.md storia-backup.md | |
sed -i "s/%date%/$(date +'%Y-%m-%d')/g" storia.md | |
sed -i "s/%time%/$(date +'%H:%M')/g" storia.md | |
npx @marp-team/marp-cli@latest storia.md --pdf --allow-local-files | |
rm storia.md | |
mv storia-backup.md storia.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 slide files" | |
git push | |