Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: slides pdf integration #3

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/generate-slides-pdf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Generate PDF Slides

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
generate-pdf:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "18"

- name: Start live-server
run: |
nohup npx live-server docs --port=8080 --quiet --no-browser > live-server.log 2>&1 &
echo "Started live-server, waiting for it to initialize..."
sleep 15

- name: Check if live-server is up
run: |
echo "Waiting for live-server to start..."
until curl -s http://127.0.0.1:8080/ > /dev/null; do
sleep 1
done
echo "live-server is up and running."

- name: Install Decktape
run: npm i -g decktape

- name: Generate PDF
run: decktape remark http://127.0.0.1:8080/ slides.pdf

- name: Upload PDF as an artifact
uses: actions/upload-artifact@v3
with:
name: slides-pdf
path: slides.pdf
Loading