update github actions workflow file for sloth #20
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: chameleon manual | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ master ] | |
paths: [ 'chameleon/**', '.github/**' ] | |
tags: | |
- "v*.*.*" | |
jobs: | |
Build_Chameleon: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Dependencies | |
run: | | |
sudo apt-get install pandoc weasyprint texlive-latex-base texlive-fonts-recommended texlive-extra-utils texlive-latex-extra fonts-roboto | |
sudo pip install pandoc-secnos | |
# setting the metadata title changes the title displayed by pdf-viewers, but introduces a separate heading (which is undesired). To remove that, set the title variable to null | |
- name: Build Fancy Version | |
run: | | |
cd ${{github.workspace}}/chameleon/manual | |
pandoc *.md -o chameleon_manual.pdf --filter pandoc-secnos --pdf-engine=weasyprint --css ${{github.workspace}}/common/style_dark.css --metadata title="Chameleon" -V "title:" | |
# setting the metadata title changes the title displayed by pdf-viewers, but introduces a separate heading (which is undesired). To remove that, set the title variable to null | |
- name: Build Print Version | |
run: | | |
cd ${{github.workspace}}/chameleon/manual | |
pandoc *.md -o chameleon_manual_print.pdf --filter pandoc-secnos --pdf-engine=weasyprint --css ${{github.workspace}}/common/style_print.css --metadata title="Chameleon" -V "title:" | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: chameleon_manual | |
path: | | |
${{github.workspace}}/chameleon/manual/chameleon_manual.pdf | |
${{github.workspace}}/chameleon/manual/chameleon_manual_print.pdf | |
overwrite: 'true' |