Skip to content

aula14:

aula14: #102

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: marp-build-and-deploy
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages and Marp Build
permissions:
contents: write
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Ensure build dir exists
run: mkdir -p build
- name: Copy images directory (if exists)
run: if [[ -d img ]]; then cp -R img build/img; fi
- name: Marp Build html (build folder)
uses: docker://marpteam/marp-cli:v3.0.2
with:
args: -I slides/ -o build/
env:
MARP_USER: root:root
- name: Marp Build pdf (build folder)
uses: docker://marpteam/marp-cli:v3.0.2
with:
args: --pdf --pdf-outlines --allow-local-files -I slides/ -o build/
env:
MARP_USER: root:root
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
# Upload entire repository
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2