Skip to content

Commit cd9fdfd

Browse files
feat: Export library as PDF
1 parent 91e96e6 commit cd9fdfd

File tree

6 files changed

+584
-55
lines changed

6 files changed

+584
-55
lines changed

.github/workflows/build-docs.yaml

+13-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
uses: actions/checkout@v4
2323
with:
2424
fetch-depth: 0
25-
ref: vitepress
2625

2726
- uses: pnpm/action-setup@v4
2827
with:
@@ -45,6 +44,19 @@ jobs:
4544
- name: Build with VitePress
4645
run: pnpm -C vitepress docs:build
4746

47+
- name: Run preview job on the background
48+
run: pnpm -C vitepress docs:preview &
49+
50+
- name: Wait for the preview job
51+
uses: iFaxity/wait-on-action
52+
with:
53+
resource: tcp:4173
54+
55+
- name: Generate Library PDF
56+
run: |
57+
pnpm -C vitepress docs:print
58+
pkill -f docs:preview
59+
4860
- name: Upload artifact
4961
uses: actions/upload-pages-artifact@v3
5062
with:

vitepress/package.json

+30-25
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,31 @@
11
{
2-
"name": "competitive-programming-handbook",
3-
"version": "1.0.0",
4-
"description": "Um projeto do CAECOMP - IFCE para ajudar participantes de contests de programação competitiva.",
5-
"main": "index.js",
6-
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1",
8-
"docs:dev": "vitepress dev src",
9-
"docs:build": "vitepress build src",
10-
"docs:preview": "vitepress preview src"
11-
},
12-
"repository": {
13-
"type": "git",
14-
"url": "git+https://github.com/CAECOMP/handbook-competitive-programming.git"
15-
},
16-
"author": "CAECOMP IFCE",
17-
"license": "MIT",
18-
"bugs": {
19-
"url": "https://github.com/CAECOMP/handbook-competitive-programming/issues"
20-
},
21-
"homepage": "https://github.com/CAECOMP/handbook-competitive-programming#readme",
22-
"devDependencies": {
23-
"markdown-it-mathjax3": "^4.3.2",
24-
"vitepress": "^1.4.1"
25-
}
26-
}
2+
"name": "competitive-programming-handbook",
3+
"version": "1.0.0",
4+
"description": "Um projeto do CAECOMP - IFCE para ajudar participantes de contests de programação competitiva.",
5+
"main": "index.js",
6+
"scripts": {
7+
"docs:dev": "vitepress dev src",
8+
"docs:build": "vitepress build src",
9+
"docs:preview": "vitepress preview src",
10+
"docs:print": "tsx src/createPdf.ts"
11+
},
12+
"repository": {
13+
"type": "git",
14+
"url": "git+https://github.com/CAECOMP/handbook-competitive-programming.git"
15+
},
16+
"author": "CAECOMP IFCE",
17+
"license": "MIT",
18+
"bugs": {
19+
"url": "https://github.com/CAECOMP/handbook-competitive-programming/issues"
20+
},
21+
"homepage": "https://github.com/CAECOMP/handbook-competitive-programming#readme",
22+
"devDependencies": {
23+
"@types/node": "^22.8.0",
24+
"@web-printer/core": "^0.4.0",
25+
"@web-printer/vitepress": "^0.4.0",
26+
"markdown-it-mathjax3": "^4.3.2",
27+
"tsx": "^4.19.1",
28+
"typescript": "^5.6.3",
29+
"vitepress": "^1.4.1"
30+
}
31+
}

0 commit comments

Comments
 (0)