Adds a PDF generation task #1
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: Generate PDF and deploy | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
generate-pdf: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Jekyll and dependencies | |
run: | | |
gem install bundler | |
bundle install | |
- name: Generate PDF | |
run: | | |
jekyll build | |
wkhtmltopdf index.html output.pdf | |
- name: Replace existing PDF | |
run: | | |
rm -f output.pdf | |
mv index.html output.pdf | |
- name: Commit changes | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Your Name" | |
git add output.pdf | |
git commit -m "Update PDF" | |
git push |