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

Fix generating the PDF and improve its formatting #393

Merged
merged 3 commits into from
Dec 4, 2024
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
38 changes: 31 additions & 7 deletions .github/workflows/pdf.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,48 @@
name: Generate PDF

on:
workflow_dispatch:
release:
types: [published]

jobs:
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great that you also updated the action versions (also for setup-node below)!


- name: Change absolute paths to relative
run: perl -pi -e 's@\]\(\/@\]\(@' _sidebar.md
- uses: actions/setup-node@v1

- uses: actions/setup-node@v4
with:
node-version: '12'
- name: Install converter + uploader
run: npm install docsify-pdf-converter @iomeg/zenodo-upload
- name: Generate PDF
run: npx docsify-pdf-converter
node-version: '20'

- name: Install uploader
run: npm install @iomeg/zenodo-upload

- name: Pull Docker image
run: docker pull ghcr.io/kernoeb/docker-docsify-pdf:latest

- name: Generate PDF using the Docker image
run: |
docker run --rm --privileged \
-v "${{ github.workspace }}/":/home/node/docs:rw \
-v "${{ github.workspace }}/":/home/node/pdf:rw \
-v "${{ github.workspace }}/images/pdf-cover.pdf":/home/node/resources/cover.pdf:rw \
--user $(id -u):$(id -g) \
-e "PDF_OUTPUT_NAME=guide-nlesc.pdf" \
ghcr.io/kernoeb/docker-docsify-pdf:latest

- name: Upload PDF as an artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: generated-pdf
path: guide-nlesc.pdf

- name: Upload PDF to Zenodo
if: github.event_name == 'release'
run: npx --package @iomeg/zenodo-upload zenodo_upload 4020565 guide-nlesc.pdf "${github_ref:10}" ${{ secrets.ZENODO_TOKEN }}
env:
github_ref: ${{ github.ref }}
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# files for JetBrains editors:
**/*.iml
.idea

# VS Code
.vscode

# Mac OS
.DS_Store


4 changes: 4 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,7 @@ authors:
- affiliation: "Netherlands eScience Center"
family-names: Cushing
given-names: Reggie
- affiliation: "Netherlands eScience Center"
family-names: Kasalica
given-names: Vedran
orcid: "https://orcid.org/0000-0002-0097-1056"
Binary file added images/pdf-cover.pdf
Binary file not shown.
2 changes: 2 additions & 0 deletions technology/technology_overview.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Technology Overview
egpbos marked this conversation as resolved.
Show resolved Hide resolved

*Page maintainer: Patrick Bos* [@egpbos](https://github.com/egpbos)

These chapters are based on our experiences with using specific software technologies.
Expand Down
Loading