Skip to content

Instantly share code, notes, and snippets.

@ras0q
Last active October 25, 2022 08:53
Show Gist options
  • Save ras0q/ee1f80e99f804a7a27e93dc3e1e23f78 to your computer and use it in GitHub Desktop.
Save ras0q/ee1f80e99f804a7a27e93dc3e1e23f78 to your computer and use it in GitHub Desktop.
marp形式でスライド書いてGithub PagesにデプロイするGithub Actions
name: pages
on:
push:
branches:
- 'main'
paths:
- 'docs/**'
- '.github/workflows/pages.yml'
pull_request:
jobs:
marp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: docker://marpteam/marp-cli:latest
with:
args: -o ./dist/index.html ./docs/slide.md
env:
MARP_USER: root:root
- uses: actions/upload-pages-artifact@v1
with:
path: dist
deploy:
needs:
- marp
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/deploy-pages@v1
id: deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment