2022-07-23 18:24:59 +00:00
|
|
|
# Generates and saved a PDF document from the main markdown file
|
|
|
|
# Easier to read on certain devices, or for users with accesibility needs
|
|
|
|
|
|
|
|
name: 📁 Compile PDF Document
|
|
|
|
on:
|
|
|
|
workflow_dispatch: # Manual dispatch
|
|
|
|
schedule:
|
|
|
|
- cron: '0 5 * * 6' # Every Saturday morning.
|
|
|
|
jobs:
|
|
|
|
# Job #1 - Generate an embedded SVG asset, showing all contributors
|
2022-07-23 18:31:46 +00:00
|
|
|
compile-pdf:
|
2022-07-23 18:24:59 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-07-23 19:10:31 +00:00
|
|
|
- name: Checkout 🛎️
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Make PDF 📄
|
2022-07-23 19:19:36 +00:00
|
|
|
uses: baileyjm02/markdown-to-pdf@v1.1.0
|
2022-07-23 18:24:59 +00:00
|
|
|
with:
|
2022-07-23 19:19:36 +00:00
|
|
|
input_dir: .
|
|
|
|
output_dir: .github/assets/
|
2022-07-23 18:24:59 +00:00
|
|
|
build_pdf: true
|
|
|
|
build_html: false
|
|
|
|
table_of_contents: false
|
2022-07-23 19:10:31 +00:00
|
|
|
- name: Upload Artifact 📤
|
|
|
|
uses: actions/upload-artifact@v3
|
2022-07-23 18:24:59 +00:00
|
|
|
with:
|
2022-07-23 18:31:46 +00:00
|
|
|
name: awesome-privacy-pdf
|
2022-07-23 19:10:31 +00:00
|
|
|
path: .github/assets/README.pdf
|
|
|
|
- name: Commit file ✅
|
|
|
|
run: |
|
|
|
|
git config --local user.email "alicia-gh-bot@mail.as93.net"
|
|
|
|
git config --local user.name "liss-bot"
|
2022-07-23 19:19:36 +00:00
|
|
|
git add .github/assets/*.pdf
|
2022-07-23 19:10:31 +00:00
|
|
|
if ! git diff-index --quiet HEAD; then
|
|
|
|
git commit -m "Generate PDF file"
|
|
|
|
else
|
|
|
|
echo "Nothing to do"
|
|
|
|
fi
|
|
|
|
- name: Push changes ➡️
|
|
|
|
uses: ad-m/github-push-action@master
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
|
|
|
|
branch: ${{ github.ref }}
|
2022-07-23 18:24:59 +00:00
|
|
|
|