try wildcard for marp #11
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: marp-and-mkdocs-to-pages | |
concurrency: marp-and-mkdocs-to-pages | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- slides/** | |
- docs/** | |
- mkdocs.yml | |
- img/** | |
- .github/workflows/publish-pages.yml | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code ✅ | |
uses: actions/checkout@v4 | |
- name: Setup Python3 🐍 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Build MkDocs Site | |
run: | | |
pip install mkdocs-material | |
mkdocs build | |
- name: Build Directories and Copy images 🖼️ | |
run: | | |
mkdir site/slides \ | |
&& mkdir site/pdfs \ | |
&& cp -R img site/slides/img | |
- name: Build HTML from Marp 🔨 | |
uses: docker://marpteam/marp-cli:v3.0.2 | |
with: | |
args: --html slides/*.md -o site/slides/ | |
env: | |
MARP_USER: root:root | |
- name: Build PDF from marp_slides.md 🔨 | |
uses: docker://marpteam/marp-cli:v3.0.2 | |
with: | |
args: --html --allow-local-files slides/*.md -o site/pdfs/ | |
env: | |
MARP_USER: root:root | |
- name: Deploy production 🚀 | |
if: ${{ github.event_name == 'push' }} | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
folder: ./site/ |