Update Documentation.md #14
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: Create Release Notes PDF | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
create_pdf: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Pandoc | |
run: | | |
sudo apt-get update | |
# Install pdflatex as prerequisite for pandoc PDF output | |
sudo apt-get install -y texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra | |
sudo apt-get install -y pandoc | |
- name: Find and Convert Release Notes | |
id: convert_notes | |
run: | | |
pwd | |
find . -type f -name 'Releasenotes.md' -exec sh -c ' | |
basepath=$(dirname "{}") # Get the folder path | |
echo $basepath | |
if [ ! -f "$basepath/Releasenotes.pdf" ]; then | |
pandoc --variable mainfont="Arial" "{}" -o "$basepath/Releasenotes.pdf" | |
git config --global user.name "GitHub Action" | |
git config --global user.email "action@github.com" | |
git add "$basepath/Releasenotes.pdf" | |
git commit -m "Add Releasenotes.pdf" | |
git push origin main | |
fi | |
' \; |