Skip to content

Commit

Permalink
Update publish_pdf.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
JoaoRodrigues authored May 15, 2020
1 parent f59ff2b commit f43c631
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/publish_pdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,16 @@ jobs:
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
sudo dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb
# Run
wkhtmltopdf https://joaorodrigues.github.io/git-cheat-sheet/ git-cheat-sheet.pdf
wkhtmltopdf https://joaorodrigues.github.io/git-cheat-sheet/ new.pdf
# Compare
echo "::set-env name=SKIPPUSH::$(cmp --silent git-cheat-sheet.pdf new.pdf || echo 'True')"
- name: Push updated PDF
run: |
mv new.pdf git-cheat-sheet.pdf
# Push PDF
git config --global user.name 'Autobot'
git config --global user.email '[email protected]'
git add git-cheat-sheet.pdf
git commit -m "Automated PDF"
git commit -m "Automated PDF update"
git push
if: env.SKIPPUSH == 'True'

0 comments on commit f43c631

Please sign in to comment.