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

enable pdf export and automatically upload to ipfs #7

Merged
merged 3 commits into from
Mar 14, 2022
Merged
Show file tree
Hide file tree
Changes from 2 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
37 changes: 37 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build

on:
push:
branches:
- main

pull_request:
emilianobonassi marked this conversation as resolved.
Show resolved Hide resolved
branches:
- main

jobs:
tests:
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v2

- name: Setup node.js
uses: actions/setup-node@v2
with:
node-version: '16.x'

- uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '8'

- run: yarn

- run: yarn pdf

- run: mv 'The Eth2 Book.pdf' book.pdf

- uses: aquiladev/ipfs-action@v0.2.1-alpha.4
with:
path: './book.pdf'
9 changes: 9 additions & 0 deletions .vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,5 +253,14 @@ module.exports = {
delimiters: 'dollars'
},
],
[
'vuepress-plugin-export',
{
bundles: [{
filter: /\/book\//,
dest: (siteConfig) => `${siteConfig.title}.pdf`,
}]
}
]
]
}
2 changes: 1 addition & 1 deletion crowdin.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
files:
- source: /book/**/*.*
- source: book/**/*.md
emilianobonassi marked this conversation as resolved.
Show resolved Hide resolved
translation: '%original_path%/%original_file_name%'
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
"repository": "/the-eth2-book",
"scripts": {
"dev": "vuepress dev .",
"build": "vuepress build ."
"build": "vuepress build .",
"pdf": "vuepress export ."
},
"license": "MIT",
"devDependencies": {
"@maginapp/vuepress-plugin-katex": "^1.0.11",
"vuepress": "^1.5.3"
"vuepress": "^1.5.3",
"vuepress-plugin-export": "https://github.com/ulivz/vuepress-plugin-export#01418c8"
}
}
Loading