forked from yhatt/marp-cli-example
-
Notifications
You must be signed in to change notification settings - Fork 8
50 lines (42 loc) · 1.34 KB
/
github-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
name: GitHub Pages
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: '^12.16.1'
- uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies and Puppeteer
run: |
npm ci
sudo apt-get install libgbm-dev
npm i puppeteer --no-save
- name: Build Marp slide deck
run: |
CHROME_PATH=$(node .puppeteer.js) npm run build
touch ./dist/.nojekyll
env:
# Please update URL if you want to use custom domain
URL: https://${{ github.event.repository.owner.name }}.github.io/${{ github.event.repository.name }}
# Recommend to set lang for your deck to get better rendering for Open Graph image
LANG: en-US
- name: Deploy to GitHub pages
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: master
FOLDER: dist
CLEAN: false