[docs](doc): deleted RealDash, 10×footnotes #50
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: pandoc.yml – Create documents | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Set up Pandoc | |
run: | | |
sudo apt-get install -y pandoc context | |
- name: Initialize directories | |
run: mkdir -p output | |
- name: Check Pandoc version | |
id: version | |
run: | | |
PANDOC_VERSION=$(pandoc --version | head -1 | cut -d' ' -f2 | cut -d'.' -f1) | |
if [ "$PANDOC_VERSION" -eq "2" ]; then | |
echo "::set-output name=smart_flag;-smart" | |
else | |
echo "::set-output name=smart_flag;--smart" | |
fi | |
- name: Build PDF | |
run: | | |
for f in markdown/*.md; do | |
echo $f # debug | |
FILE_NAME=$(basename "$f" | sed 's/.md//g') | |
echo $FILE_NAME # debug | |
echo output/${FILE_NAME}.pdf # debug | |
# pandoc --standalone \ # --template styles/chmduquesne.tex \ | |
# --from markdown --to context \ | |
# --variable papersize=letter \ | |
# --verbose \ # debug | |
# --output output/${FILE_NAME}.tex $f | |
# mtxrun --path=output --result=${FILE_NAME}.pdf --script context ${FILE_NAME}.tex | |
# pandoc --verbose --standalone --from markdown --to pdf --output output/${FILE_NAME}.pdf $f | |
pandoc --verbose --standalone --from markdown --to pdf --output output/${FILE_NAME}.tex $f | |
mtxrun --path=output --result=${FILE_NAME}.pdf --script context ${FILE_NAME}.tex | |
git add output/${FILE_NAME}.pdf | |
done | |
- name: Build DOCX | |
run: | | |
for f in markdown/*.md; do | |
FILE_NAME=$(basename "$f" | sed 's/.md//g') | |
pandoc --standalone ${{ steps.version.outputs.smart_flag }} $f --output output/${FILE_NAME}.docx | |
git add output/${FILE_NAME}.docx | |
done | |
- name: Check in documents | |
run : | | |
git commit -m "[docs](doc): adding output to GitHub" | |
- name: Upload output | |
uses: actions/[email protected] | |
with: | |
name: output | |
path: output |