-
Notifications
You must be signed in to change notification settings - Fork 24
137 lines (126 loc) · 5.82 KB
/
createPDF.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: Generate and Upload PDF
on:
push:
jobs:
generate-pdf:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 16 # You can change the Node.js version as needed
- name: Install Dependencies
run: sudo apt-get update && sudo apt-get install -y pandoc texlive-latex-base texlive-fonts-extra texlive-latex-extra texlive-fonts-recommended
- name: Generate Markdown File
run: |
mkdir ../.gitbook
cp -Rfv .gitbook/* ../.gitbook/
cat manual/mainpage.md >> manual.md.fin
cat SUMMARY.md >> manual.md.fin
cat introduction.md >> manual.md.fin
cat downloads.md >> manual.md.fin
echo "#General" >> manual.md.fin
echo " --------------- " >> manual.md.fin
echo " --------------- " >> manual.md.fin
cat general/features.md >> manual.md.fin
cat general/OpenHD-vs-Alternatives.md >> manual.md.fin
cat general/troubleshooting.md >> manual.md.fin
cat general/faq.md >> manual.md.fin
cat general/software-faq.md >> manual.md.fin
cat general/contributing.md >> manual.md.fin
cat general/team.md >> manual.md.fin
echo "#Installation" >> manual.md.fin
echo " --------------- " >> manual.md.fin
echo " --------------- " >> manual.md.fin
cat installation-guide.md >> manual.md.fin
echo "#Hardware" >> manual.md.fin
echo " --------------- " >> manual.md.fin
echo " --------------- " >> manual.md.fin
cat hardware/first-time-setup.md >> manual.md.fin
cat hardware/sbcs.md >> manual.md.fin
cat hardware/raspberry.md >> manual.md.fin
cat hardware/ochin.md >> manual.md.fin
cat hardware/X86.md >> manual.md.fin
cat hardware/radxa.md >> manual.md.fin
cat hardware/custom-hardware.md >> manual.md.fin
cat hardware/discontinued.md >> manual.md.fin
cat hardware/jetson.md >> manual.md.fin
cat hardware/cameras.md >> manual.md.fin
cat hardware/cameras/raspberry-cameras.md >> manual.md.fin
cat hardware/cameras/radxa-cameras.md >> manual.md.fin
cat hardware/cameras/usb-camera.md >> manual.md.fin
cat hardware/cameras/rpi-hdmi-to-csi.md >> manual.md.fin
cat hardware/cameras/hdmi-cameras-rpi.md >> manual.md.fin
cat hardware/cameras/ip-cameras.md >> manual.md.fin
cat hardware/cameras/special-camera.md >> manual.md.fin
cat hardware/cameras/custom-unmanaged-camera.md >> manual.md.fin
cat hardware/cameras/custom-cameras.md >> manual.md.fin
cat hardware/wifi-adapters.md >> manual.md.fin
cat hardware/antennas.md >> manual.md.fin
cat hardware/flightControllers.md >> manual.md.fin
cat hardware/wiring.md >> manual.md.fin
cat hardware/displays.md >> manual.md.fin
cat hardware/hardware.conf.md >> manual.md.fin
echo "## Software Setup" >> manual.md.fin
echo " --------------- " >> manual.md.fin
echo " --------------- " >> manual.md.fin
cat software-setup/inav.md >> manual.md.fin
cat software-setup/ardupilot.md >> manual.md.fin
cat software-setup/betaflight.md >> manual.md.fin
cat software-setup/recording.md >> manual.md.fin
cat software-setup/tx-power.md >> manual.md.fin
cat software-setup/mcs-via-rc.md >> manual.md.fin
cat software-setup/joystick-rc.md >> manual.md.fin
cat software-setup/camera-settings.md >> manual.md.fin
cat software-setup/tethering.md >> manual.md.fin
cat software-setup/ethernet-hotspot.md >> manual.md.fin
cat software-setup/wifi-hotspot.md >> manual.md.fin
cat software-setup/variable-bitrate.md >> manual.md.fin
echo "## Advanced Setup" >> manual.md.fin
echo " --------------- " >> manual.md.fin
echo " --------------- " >> manual.md.fin
cat advanced-setup/air-recording.md >> manual.md.fin
cat advanced-setup/dual-camera.md >> manual.md.fin
echo "## Ground Station Software" >> manual.md.fin
echo " --------------- " >> manual.md.fin
echo " --------------- " >> manual.md.fin
cat ground-station-software/qopenhd-osd-backup.md >> manual.md.fin
cat ground-station-software/qgroundcontrol.md >> manual.md.fin
cat ground-station-software/tower.md >> manual.md.fin
cat ground-station-software/fpv_vr.md >> manual.md.fin
echo "## Developers Corner" >> manual.md.fin
echo " --------------- " >> manual.md.fin
echo " --------------- " >> manual.md.fin
cat developers/porting.md >> manual.md.fin
mv manual.md.fin manual.md
- name: Generate PDF
run: |
pandoc -s manual.md -o manual.pdf
- name: Upload PDF as Artifact
uses: actions/upload-artifact@v2
with:
name: manual
path: manual.pdf
- name: Set Git User Identity
run: |
git config --global user.email "[email protected]"
git config --global user.name "Raphael"
- name: Create Release Tag
run: git tag -a v0.1 -m "Version 0.1"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push Release Tag
run: git push --follow-tags
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
files: manual.pdf
tag_name: release
name: "OpenHD PDF"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}