Skip to content

Commit

Permalink
feat: Export library as PDF
Browse files Browse the repository at this point in the history
  • Loading branch information
Claudemirovsky committed Oct 25, 2024
1 parent 91e96e6 commit cd9fdfd
Show file tree
Hide file tree
Showing 6 changed files with 584 additions and 55 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/build-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: vitepress

- uses: pnpm/action-setup@v4
with:
Expand All @@ -45,6 +44,19 @@ jobs:
- name: Build with VitePress
run: pnpm -C vitepress docs:build

- name: Run preview job on the background
run: pnpm -C vitepress docs:preview &

- name: Wait for the preview job
uses: iFaxity/wait-on-action
with:
resource: tcp:4173

- name: Generate Library PDF
run: |
pnpm -C vitepress docs:print
pkill -f docs:preview
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
55 changes: 30 additions & 25 deletions vitepress/package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
{
"name": "competitive-programming-handbook",
"version": "1.0.0",
"description": "Um projeto do CAECOMP - IFCE para ajudar participantes de contests de programação competitiva.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"docs:dev": "vitepress dev src",
"docs:build": "vitepress build src",
"docs:preview": "vitepress preview src"
},
"repository": {
"type": "git",
"url": "git+https://github.com/CAECOMP/handbook-competitive-programming.git"
},
"author": "CAECOMP IFCE",
"license": "MIT",
"bugs": {
"url": "https://github.com/CAECOMP/handbook-competitive-programming/issues"
},
"homepage": "https://github.com/CAECOMP/handbook-competitive-programming#readme",
"devDependencies": {
"markdown-it-mathjax3": "^4.3.2",
"vitepress": "^1.4.1"
}
}
"name": "competitive-programming-handbook",
"version": "1.0.0",
"description": "Um projeto do CAECOMP - IFCE para ajudar participantes de contests de programação competitiva.",
"main": "index.js",
"scripts": {
"docs:dev": "vitepress dev src",
"docs:build": "vitepress build src",
"docs:preview": "vitepress preview src",
"docs:print": "tsx src/createPdf.ts"
},
"repository": {
"type": "git",
"url": "git+https://github.com/CAECOMP/handbook-competitive-programming.git"
},
"author": "CAECOMP IFCE",
"license": "MIT",
"bugs": {
"url": "https://github.com/CAECOMP/handbook-competitive-programming/issues"
},
"homepage": "https://github.com/CAECOMP/handbook-competitive-programming#readme",
"devDependencies": {
"@types/node": "^22.8.0",
"@web-printer/core": "^0.4.0",
"@web-printer/vitepress": "^0.4.0",
"markdown-it-mathjax3": "^4.3.2",
"tsx": "^4.19.1",
"typescript": "^5.6.3",
"vitepress": "^1.4.1"
}
}
Loading

0 comments on commit cd9fdfd

Please sign in to comment.