Skip to content

Commit 240d2e0

Browse files
committed
Add CI workflow for auto PDF build
1 parent 0b2d4d1 commit 240d2e0

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
build:
15+
name: Build PDF
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v6
19+
- name: Install Chromium and CJK fonts
20+
run: |
21+
sudo apt-get update
22+
sudo apt-get install -y chromium-browser fonts-noto-cjk fonts-noto-cjk-extra
23+
- name: Install mdpress (latest)
24+
run: |
25+
LATEST_TAG=$(curl -fsSL https://api.github.com/repos/yeasy/mdpress/releases/latest | jq -r .tag_name)
26+
VERSION="${LATEST_TAG#v}"
27+
echo "Installing mdpress $VERSION"
28+
curl -fsSL "https://github.com/yeasy/mdPress/releases/download/$LATEST_TAG/mdpress_${VERSION}_linux_amd64.tar.gz" -o mdpress.tar.gz
29+
tar xzf mdpress.tar.gz
30+
sudo mv mdpress /usr/local/bin/
31+
mdpress --version
32+
- name: Build PDF
33+
run: mdpress build --format pdf --output agentic_ai_guide.pdf
34+
- name: Upload PDF as artifact
35+
uses: actions/upload-artifact@v7
36+
with:
37+
name: agentic_ai_guide-pdf
38+
path: agentic_ai_guide.pdf

0 commit comments

Comments
 (0)