Skip to content

Commit 387177b

Browse files
authored
Merge pull request #217 from NLeSC/pdf
Generate PDF
2 parents 632ca33 + 6f91263 commit 387177b

File tree

4 files changed

+35
-0
lines changed

4 files changed

+35
-0
lines changed

.docsifytopdfrc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
contents:
2+
- _sidebar.md
3+
pathToPublic: guide-nlesc.pdf

.github/workflows/pdf.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Generate PDF
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
generate:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Change absolute paths to relative
13+
run: perl -pi -e 's@\]\(\/@\]\(@' _sidebar.md
14+
- uses: actions/setup-node@v1
15+
with:
16+
node-version: '12'
17+
- name: Install converter + uploadergit
18+
run: npm install docsify-pdf-converter @iomeg/zenodo-upload
19+
- name: Generate PDF
20+
run: npx docsify-pdf-converter
21+
- name: Upload PDF to Zenodo
22+
run: npx --package @iomeg/zenodo-upload zenodo_upload 4020565 guide-nlesc.pdf "${github_ref:10}" ${{ secrets.ZENODO_TOKEN }}
23+
env:
24+
github_ref: ${{ github.ref }}

CONTRIBUTING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,8 @@ If you have made a significant contribution to the guide, please make sure to ad
4141
## Chapter Owners
4242

4343
To see who is responsible for which part of the guide see [chapter_owners.md](chapter_owners.md).
44+
45+
## Create a PDF file
46+
47+
We host a PDF version of the guide on [Zenodo](https://doi.org/10.5281/zenodo.4020565).
48+
To update it a [new release](https://github.com/NLeSC/guide/releases) needs to be made of the guide. This will trigger a GitHub action to create a new Zenodo version with the PDF file.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Dead-link checker status (does not actually build guide itself): [![Build Status](https://travis-ci.org/NLeSC/guide.svg?branch=master)](https://travis-ci.org/NLeSC/guide)
2+
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4020565.svg)](https://doi.org/10.5281/zenodo.4020565)
23

34
# Guide
45

@@ -11,3 +12,5 @@ Read this book online here: https://guide.esciencecenter.nl
1112
If you would like to contribute to this book see [CONTRIBUTING.md](CONTRIBUTING.md).
1213

1314
To see who is responsible for which part of the guide see [chapter_owners.md](chapter_owners.md).
15+
16+
The guide is best read online, but there is a [PDF document](https://doi.org/10.5281/zenodo.4020564) for offline reading.

0 commit comments

Comments
 (0)