Skip to content

Render and Publish

Render and Publish #86

Workflow file for this run

on:
push:
branches:
- main
workflow_dispatch:
name: Render and Publish
permissions:
contents: write
pages: write
jobs:
build-deploy:
runs-on: macos-latest
steps:
- name: Set Timezone
uses: szenius/set-timezone@v2.0
with:
timezoneMacos: 'Europe/Zurich'
- name: Check out repository
uses: actions/checkout@v4
- name: Overwrite _quarto.yml
if: github.repository == 'maehr/open-research-data-template'
run: |
cp .github/_quarto.yml _quarto.yml
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tinytex: true
- name: Set up TeX dependencies
run: |
tlmgr install hyphen-german
- name: Render Quarto Project
uses: quarto-dev/quarto-actions/render@v2
with:
path: manuscript
to: all
- name: Install Chromium
run: |
brew install --cask chromium
- name: Convert html to pdf with Chromium
run: |
chromium --headless --disable-gpu --print-to-pdf=manuscript/_manuscript/handbuch-diskriminierungsfreie-metadaten.pdf --scale=1.0 --no-pdf-header-footer --print-background --virtual-time-budget=10000 file:///$(pwd)/manuscript/_manuscript/index.html
- name: Clean up
run: |
rm -rf ./handbuch-diskriminierungsfreie-metadaten_files/
rm -rf ./_tex/
- name: JamPack
run: |
npx @divriots/jampack .
- name: Publish to GitHub Pages
uses: quarto-dev/quarto-actions/publish@v2
with:
path: manuscript
target: gh-pages
render: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}