Merge pull request #55 from jigintern/sztm/fix-intern-dev-tutorial #109
This file contains hidden or 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 | |
| - slide: about-webapp | |
| output_name: about-webapp-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: Upload Slide Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./ | |
| - name: Upload to GitHub Pages | |
| uses: actions/upload-pages-artifact@v1 | |
| with: | |
| path: ./ | |
| 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 |