feat: add 3 examples for landscape support #209
This file contains hidden or 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: Build Example PDF files | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | |
| - name: install pandoc | |
| env: | |
| PANDOC_VERSION: "3.5" | |
| run: | | |
| wget -qO- https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-linux-amd64.tar.gz | sudo tar xzf - --strip-components 1 -C /usr/local/ | |
| - name: install TeX Live and install packages | |
| run: bash .github/scripts/install-texlive.sh | |
| - name: install PDF conversion tool poppler | |
| run: sudo apt-get update -qq && sudo apt-get install poppler-utils -y | |
| - name: install fonts | |
| run: bash .github/scripts/install-fonts.sh | |
| - name: install Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: install python filters | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pandoc-latex-environment | |
| - name: generate a temporary release with single file template versions | |
| run: bash ./tools/release.sh 0.0.0 | |
| - name: build examples | |
| run: cd examples && bash build-examples.sh && cd .. | |
| - name: add generated example files | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-files | |
| path: | | |
| examples/*/document.pdf | |
| examples/*/preview.png | |
| - name: commit files | |
| run: | | |
| git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| git commit -m "Add generated example files" -a | |
| - name: push changes | |
| uses: ad-m/github-push-action@master | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| branch: ${{ github.ref }} |