updating image #94
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: Publish to GitHub Pages and Generate PDF | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v1 | |
- name: Install Emacs | |
run: | | |
sudo apt update | |
sudo apt install emacs-nox --yes | |
- name: Build the site | |
run: ./build.sh | |
- name: Publish generated content to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@4.1.4 | |
with: | |
branch: gh-pages | |
folder: public | |
- name: Check out gh-pages branch | |
run: | | |
git fetch origin gh-pages:gh-pages | |
git checkout gh-pages | |
- name: Convert HTML to PDF | |
uses: fifsky/html-to-pdf-action@master | |
with: | |
htmlFile: ./index.html | |
outputFile: ./mbcv.pdf | |
pdfOptions: '{"scale": 0.5, "format": "A4"}' | |
- name: Commit and push PDF to gh-pages branch | |
run: | | |
git add ./mbcv.pdf | |
git commit -m "Add generated PDF" | |
git push origin gh-pages |