-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.23 KB
/
visualize_genesis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Generate Genesis PDF Report
on:
pull_request:
branches:
- main
push:
branches:
- main
paths:
- 'networks/mantra-dukong-1/genesis.json'
- 'networks/mantra-1/genesis.json'
- 'networks/visualize_genesis.py'
- 'networks/template.tex'
- '.github/workflows/generate_pdf.yml'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y pandoc texlive-xetex texlive-fonts-recommended texlive-latex-recommended texlive-fonts-extra
pip install matplotlib
- name: Run visualize_genesis.py
working-directory: networks
run: |
python visualize_genesis.py
- name: Convert Markdown to PDF
working-directory: networks
run: |
pandoc report.md -o report.pdf --from markdown --template=template.tex --pdf-engine=xelatex
- name: Upload PDF Artifact
uses: actions/upload-artifact@v4
with:
name: Genesis Report
path: networks/report.pdf