Minor tweak of the listing page #31
This file contains hidden or 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: Build and Deploy Slides | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # get full history so that slide dates are correct in listing | |
- name: Prepare Build Directory | |
run: mkdir -p build | |
- name: Build slide decks | |
run: | | |
for dir in $(ls decks); do | |
if [ -d "decks/$dir" -a -f "decks/$dir/slides.md" ]; then | |
mkdir -p "build/$dir" | |
docker run \ | |
-e MARP_USER=root:root \ | |
-v "$PWD:/workspace" \ | |
-w /workspace \ | |
marpteam/marp-cli:v3.0.2 \ | |
"decks/$dir/slides.md" \ | |
-o "build/$dir/index.html" \ | |
--theme theme/codestar.css \ | |
--html | |
rsync -av --exclude='slides.md' "decks/$dir/" "build/$dir/" | |
fi | |
done | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.13" | |
cache: "pip" | |
- run: pip install -r scripts/requirements.txt | |
- name: Generate listing | |
run: | | |
python scripts/decks_list.py | |
cp listing/* build/ | |
mv decks.json build/ | |
- name: Add CNAME file | |
run: echo slides.codestar.nl > build/CNAME | |
- name: Upload artifacts | |
id: deployment | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: build/ | |
deploy: | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |