Skip to content

Commit 06e24b1

Browse files
authored
feature: github pages
1 parent b643c3d commit 06e24b1

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/github-pages.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: pages
17+
cancel-in-progress: true
18+
19+
jobs:
20+
deploy:
21+
environment:
22+
name: github-pages
23+
url: ${{ steps.deployment.outputs.page_url }}
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v3
27+
28+
- name: Install Node.js
29+
uses: actions/setup-node@v3
30+
with:
31+
cache: npm
32+
node-version-file: '.nvmrc'
33+
34+
- name: Install dependencies
35+
run: npm ci
36+
37+
- name: Build Marp slide deck
38+
run: CHROME_PATH=$(npx @puppeteer/browsers install chrome@stable --path $(realpath ./tmp) | awk '{print $2}') npm run build
39+
env:
40+
# Please update URL if you want to use custom domain
41+
URL: https://${{ github.event.repository.owner.name }}.github.io/${{ github.event.repository.name }}
42+
43+
# Recommend to set lang for your deck to get better rendering for Open Graph image
44+
LANG: en-US
45+
46+
- name: Upload page artifacts
47+
uses: actions/upload-pages-artifact@v1
48+
with:
49+
path: public
50+
51+
- name: Deploy to GitHub Pages
52+
id: deployment
53+
uses: actions/deploy-pages@main

0 commit comments

Comments
 (0)