Skip to content

Commit

Permalink
something new to try
Browse files Browse the repository at this point in the history
  • Loading branch information
hydrotian committed Dec 28, 2023
1 parent 6261d53 commit 5ab7b3a
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/render-slides.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: render-talks-with-marp

on:
push:
branches: [ master ]
paths:
- "_talks/**"

jobs:
render-talks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build talks
uses: docker://marpteam/marp-cli:v2.0.4
with:
args: -I _talks/ --output talks/
env:
MARP_USER: root:root
- name: Push to Branch
run: |
git config user.name 'marp talks build'
git config user.email '[email protected]'
git checkout -b "talks-${{github.run_id}}"
git add talks/
git commit -m "feat: Add rendered talks"
git push --set-upstream origin "talks-${{github.run_id}}"
- name: Open PR
run: |
curl -X POST \
-f \
-H "Accept: application/vnd.github+json" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
https://api.github.com/repos/hydrotian/hydrotian.github.io/pulls \
-d '{"title":"Add rendered talks","body":"Adding rendered talks","head":"talks-${{github.run_id}}","base":"master"}'
27 changes: 27 additions & 0 deletions _talks/2023-marp-test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
marp: true
theme: gaia
class: invert
# Header configuring this as marp slides
# Theme and class simply defining my preferred dark theme for slides
---

<!-- A slide with a title -->
# These are some sample markdown slides

---

<!-- Three dash breaks start a new slide -->
<!-- This one just has some text and a link -->

They're created using [marp](https://marp.app/)

---

<!-- Another slide with some bullet points -->

* They're rendered from markdown to HTML using the [marp-cli docker container](https://github.com/marp-team/marp-cli#docker).

* The rendered slides are deployed as part of my website.

* This happens in a [github action](https://github.com/UnseenWizzard/unseenwizzard.github.io/blob/8d812ca33bfac4106ddf5f58512740e925c835fa/.github/workflows/render-slides.yaml).

0 comments on commit 5ab7b3a

Please sign in to comment.