Skip to content

Commit

Permalink
Add curl and fix Build PDF step (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
reijoh authored Jan 16, 2024
1 parent 10f0130 commit 6c5a009
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if ! [ -d ~/.ssh ]; then
fi
fi

apk add --no-cache git jq librsvg font-noto-cjk zsh bash starship
apk add --no-cache git curl jq librsvg font-noto-cjk zsh bash starship
apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community font-carlito font-fira-code-nerd shellcheck

pip install pre-commit
Expand Down
24 changes: 22 additions & 2 deletions .github/workflows/convert-markdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,36 @@ jobs:
- name: Install requirements
shell: sh
run: |
apk add --no-cache git jq librsvg font-noto-cjk
apk add --no-cache git curl jq librsvg font-noto-cjk
apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community font-carlito
tlmgr update --self
tlmgr install lastpage
- name: Build PDF
shell: sh
env:
AUTHOR: ${{ inputs.DefaultAuthor }}
DESCRIPTION: ${{ inputs.DefaultDescription }}
TITLE: ${{ inputs.Title }}
SUBTITLE: ${{ inputs.Subtitle }}
FOLDER: ${{ inputs.Folder }}
FORCE_DEFAULT: ${{ inputs.ForceDefault }}
HISTORY: ${{ inputs.HistoryFile }}
LIMIT: ${{ inputs.LimitVersionHistory }}
ORDER_FILE: ${{ inputs.OrderFile }}
OUT_FILE: ${{ inputs.OutFile }}
REPLACE_FILE: ${{ inputs.ReplaceFile }}
PROJECT: ${{ inputs.Project }}
TEMPLATE: ${{ inputs.Template }}
run: |
git config --global --add safe.directory '*'
tools/mdconvert.sh -a '${{ inputs.DefaultAuthor }}' -d '${{ inputs.DefaultDescription }}' -f '${{ inputs.Folder }}' -force '${{ inputs.ForceDefault }}' -h '${{ inputs.HistoryFile }}' -l ${{ inputs.LimitVersionHistory }} -o '${{ inputs.OrderFile }}' -out '${{ inputs.OutFile }}' -p '${{ inputs.Project }}' -r '${{ inputs.ReplaceFile }}' -s '${{ inputs.Subtitle }}' -t '${{ inputs.Title }}' --template '${{ inputs.Template }}'
curl -o mdconvert.sh -sSL https://raw.githubusercontent.com/innofactororg/markdown2pdf/v2.0.2/tools/mdconvert.sh
chmod +x ./mdconvert.sh
./mdconvert.sh -a "${AUTHOR}" -d "${DESCRIPTION}" -f "${FOLDER}" \
-force "${FORCE_DEFAULT}" -h "${HISTORY}" -l ${LIMIT} \
-o "${ORDER_FILE}" -out "${OUT_FILE}" -p "${PROJECT}" \
-r "${REPLACE_FILE}" -s "${SUBTITLE}" -t "${TITLE}" \
--template "${TEMPLATE}"
- name: Publish PDF
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit 6c5a009

Please sign in to comment.