41 lines
1.4 KiB
YAML
41 lines
1.4 KiB
YAML
name: Build marp presentation
|
|
on: push
|
|
|
|
jobs:
|
|
build:
|
|
name: build marp presentation
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: restore cache
|
|
id: restore-cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: /opt/acttoolcache/
|
|
key: marp-installation
|
|
- name: checkout
|
|
uses: actions/checkout@v4
|
|
- name: install marp toolchain
|
|
if: steps.restore-cache.outputs.cache-hit != 'true'
|
|
run: |
|
|
npm i -g -y @marp-team/marp-cli@latest playwright && \
|
|
playwright install --with-deps chrome
|
|
- name: cache marp installation
|
|
if: steps.restore-cache.outputs.cache-hit != 'true'
|
|
uses: actions/cache/save@v3
|
|
with:
|
|
path: /opt/acttoolcache
|
|
key: marp-installation
|
|
- name: build presentation
|
|
working-directory: ./presentation
|
|
run: |
|
|
marp presentation.md --html -o index.html --theme-set ./themes -- && \
|
|
marp presentation.md --html --browser chrome --allow-local-files -o presentation.pdf --theme-set ./themes -- && \
|
|
zip -r ../presentation.zip .
|
|
- name: upload to pages
|
|
run: |
|
|
curl -X PUT --fail \
|
|
https://pages.ct.cozytren.ch/testrepo \
|
|
-T ./presentation.zip \
|
|
-H "Content-Type: application/zip" \
|
|
-H "Authorization: Pages ${{ secrets.GIT_PAGES_TOKEN }}"
|