Skip to content

init repo

init repo #1

Workflow file for this run

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/