Skip to content

Commit

Permalink
init repo
Browse files Browse the repository at this point in the history
  • Loading branch information
darron1217 committed Nov 11, 2023
1 parent 44e822b commit 6450095
Show file tree
Hide file tree
Showing 13 changed files with 2,357 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/marp-to-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
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:

- name: Checkout code
uses: actions/checkout@v3

- name: Marp Build
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn build

- name: Replace .md with .html in index.html
run: |
sed -i 's/\.md/.html/g' ./dist/index.html
- name: Deploy preview
if: ${{ github.event_name == 'pull_request' }}
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./dist/
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: ./dist/
clean-exclude: pr-preview/
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.pdf
*.html
.DS_Store
node_modules
dist
Binary file added images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions marp.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('@marp-team/marp-cli').Config} */
const config = {
themeSet: 'themes',
theme: 'curg',
title: 'Rust Study',
}

export default config
14 changes: 14 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "rust-slides",
"version": "1.0.0",
"repository": "https://github.com/darron1217/rust-study.git",
"author": "Darron Park <darron1217@gmail.com>",
"license": "MIT",
"scripts": {
"start": "marp -s ./src",
"build": "marp --output=dist --input-dir=src"
},
"dependencies": {
"@marp-team/marp-cli": "^3.3.1"
}
}
Loading

0 comments on commit 6450095

Please sign in to comment.