Marpスライド生成を並列jobにした #91
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: marp-github-actions | |
on: | |
push: | |
branches: | |
- main | |
- 'feature/marp/**' | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: 'pages' | |
cancel-in-progress: false | |
env: | |
LANG: 'ja_JP.UTF-8' | |
jobs: | |
build-slides: | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- slide: git | |
output_name: github-desktop-slide | |
- slide: design | |
output_name: basic-design-slide | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Setup Packages | |
run: sudo apt update && sudo apt install jq npm fonts-noto | |
- name: Install Marp CLI | |
run: npm install -g @marp-team/marp-cli | |
- name: Make Directory | |
run: mkdir dest && cp -r ./${{ matrix.slide }}/imgs ./dest/imgs | |
- name: Build Marp PDF | |
run: marp ${{ matrix.slide }}/slide.md | |
-o ./dest/${{ matrix.output_name }}.pdf | |
--allow-local-files | |
- name: Build Marp HTML | |
run: marp ${{ matrix.slide }}/slide.md | |
--html | |
-o ./dest/${{ matrix.output_name }}.html | |
--allow-local-files | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.slide }} | |
path: ./dest | |
upload-slide: | |
runs-on: ubuntu-latest | |
needs: | |
- build-slides | |
steps: | |
- name: Download git Artifact | |
uses: actions/download-artifact@v4 | |
- name: Make Directory | |
run: mkdir pages && cp -Rr ./ ./pages/ | |
- name: Upload Slide Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ./pages | |
- name: Upload to GitHub Pages | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: ./pages | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: | |
- upload-slide | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |