-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (41 loc) · 1.36 KB
/
workflow.yml
File metadata and controls
53 lines (41 loc) · 1.36 KB
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
name: Marp Workflow
on:
push:
branches:
- master
- main
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository code.
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
cache: npm
node-version-file: '.nvmrc'
- name: Install dependencies
run: npm ci
- name: Allow chrome to run in unprivileged mode.
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
- name: Build Marp slide deck
run: CHROME_PATH=$(npx -y @puppeteer/browsers@latest install chrome@stable --path $(realpath ./tmp) | awk '{print $2}') npm run build:all
- uses: actions/upload-artifact@v4
with:
name: slides
path: |
dist/*.pdf
dist/*.pptx
- name: Update username config.
run: git config --local user.name "github-actions[bot]"
- name: Update the user email config.
run: git config --local user.email "github-actions[bot]@users.noreply.github.com"
- name: Stage changed files.
run: git add dist/*
- name: Commit changed files.
run: git commit -m "Auto updating presentation files."
- name: Push code to main
run: git push origin main