Skip to content

add --dpi=300 to improve figure resolution in PDF output #5

add --dpi=300 to improve figure resolution in PDF output

add --dpi=300 to improve figure resolution in PDF output #5

Workflow file for this run

name: Build PDF
on:
push:
branches: [main]
pull_request:
branches: [main]
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pandoc
run: |
sudo apt-get update
sudo apt-get install -y pandoc
- name: Install texlive
run: |
sudo apt-get install -y \
texlive-latex-base \
texlive-latex-extra \
texlive-fonts-recommended \
texlive-fonts-extra \
texlive-luatex \
texlive-latex-recommended
- name: Build PDF
run: make pdf
- name: Upload PDF
uses: actions/upload-artifact@v4
with:
name: reference-framework-pdf
path: build/reference-framework.pdf
commit-latest:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Download PDF
uses: actions/download-artifact@v4
with:
name: reference-framework-pdf
path: .
- name: Commit PDF to project root
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add reference-framework.pdf
git diff --cached --quiet || git commit -m "update generated pdf"
git push
release:
if: github.event_name == 'release'
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Download PDF
uses: actions/download-artifact@v4
with:
name: reference-framework-pdf
path: .
- name: Extract version
id: version
run: |
VERSION=$(grep '^version:' source/main.md | sed 's/version: *"\(.*\)"/\1/')
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Copy versioned PDF to assets
run: |
mkdir -p assets
cp reference-framework.pdf "assets/EVERSE_reference_framework_v${{ steps.version.outputs.version }}.pdf"
- name: Commit versioned PDF
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add "assets/EVERSE_reference_framework_v${{ steps.version.outputs.version }}.pdf"
git add reference-framework.pdf
git diff --cached --quiet || git commit -m "add release pdf v${{ steps.version.outputs.version }}"
git push
- name: Attach PDF to release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release upload "${{ github.event.release.tag_name }}" \
"assets/EVERSE_reference_framework_v${{ steps.version.outputs.version }}.pdf" \
--clobber