-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (55 loc) · 1.61 KB
/
marp-to-pages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: marp-to-pages
concurrency: marp-to-pages
on:
push:
branches: [ main ]
pull_request:
types:
- opened
- reopened
- synchronize
- closed
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Ensure build dir exists
run: mkdir -p build
- name: Copy images directory (if exists)
run: if [[ -d img ]]; then cp -R img build/img; fi
- name: Marp Build (README)
uses: docker://marpteam/marp-cli:v3.4.0
with:
args: README.md --html -o build/index.html
env:
MARP_USER: root:root
- name: Marp Build (README.pdf)
uses: docker://marpteam/marp-cli:v3.4.0
with:
args: README.md --html --allow-local-files --pdf-outlines.headings -o build/README.pdf
env:
MARP_USER: root:root
- name: Marp Build (README.pptx)
uses: docker://marpteam/marp-cli:v3.4.0
with:
args: README.md --html --allow-local-files -o build/README.pptx
env:
MARP_USER: root:root
- name: Deploy preview
if: ${{ github.event_name == 'pull_request' }}
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./build/
preview-branch: gh-pages
umbrella-dir: pr-preview
- name: Deploy production
if: ${{ github.event_name == 'push' }}
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: ./build/
clean-exclude: pr-preview/