Skip to content

Commit 6450095

Browse files
committed
init repo
1 parent 44e822b commit 6450095

13 files changed

+2357
-0
lines changed

.github/workflows/marp-to-pages.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: marp-to-pages
2+
concurrency: marp-to-pages
3+
4+
on:
5+
push:
6+
branches: [ main ]
7+
pull_request:
8+
types:
9+
- opened
10+
- reopened
11+
- synchronize
12+
- closed
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: write
18+
pull-requests: write
19+
steps:
20+
21+
- name: Checkout code
22+
uses: actions/checkout@v3
23+
24+
- name: Marp Build
25+
uses: actions/setup-node@v3
26+
with:
27+
node-version: 16.x
28+
cache: 'yarn'
29+
- run: yarn install --frozen-lockfile
30+
- run: yarn build
31+
32+
- name: Replace .md with .html in index.html
33+
run: |
34+
sed -i 's/\.md/.html/g' ./dist/index.html
35+
36+
- name: Deploy preview
37+
if: ${{ github.event_name == 'pull_request' }}
38+
uses: rossjrw/pr-preview-action@v1
39+
with:
40+
source-dir: ./dist/
41+
preview-branch: gh-pages
42+
umbrella-dir: pr-preview
43+
44+
- name: Deploy production
45+
if: ${{ github.event_name == 'push' }}
46+
uses: JamesIves/github-pages-deploy-action@v4
47+
with:
48+
branch: gh-pages
49+
folder: ./dist/
50+
clean-exclude: pr-preview/

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*.pdf
2+
*.html
3+
.DS_Store
4+
node_modules
5+
dist

images/logo.png

12.6 KB
Loading

marp.config.mjs

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/** @type {import('@marp-team/marp-cli').Config} */
2+
const config = {
3+
themeSet: 'themes',
4+
theme: 'curg',
5+
title: 'Rust Study',
6+
}
7+
8+
export default config

package.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "rust-slides",
3+
"version": "1.0.0",
4+
"repository": "https://github.com/darron1217/rust-study.git",
5+
"author": "Darron Park <[email protected]>",
6+
"license": "MIT",
7+
"scripts": {
8+
"start": "marp -s ./src",
9+
"build": "marp --output=dist --input-dir=src"
10+
},
11+
"dependencies": {
12+
"@marp-team/marp-cli": "^3.3.1"
13+
}
14+
}

0 commit comments

Comments
 (0)