-
Notifications
You must be signed in to change notification settings - Fork 52
61 lines (57 loc) · 1.64 KB
/
deploy_doc.yaml
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
name: Build Documentation
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
paths:
- "doc/**"
- ".github/**"
- ".ci/**"
pull_request:
paths:
- "doc/**"
- ".github/**"
- ".ci/**"
jobs:
build_deploy:
name: Build documentation
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Install Dependencies on Ubuntu
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install lftp python3 make latexmk \
texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
sudo python3 -m pip install --upgrade pip
sudo pip3 install -r doc/requirements.txt
- name: Build Documentation
run: |
cd doc
make all
make latexpdf
cp build/latex/*.pdf build/html/
cd ..
- name: Deploy Documentation
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/master_n100' }}
env:
FTPUSER: ${{ secrets.FTPUSER }}
FTPPWD: ${{ secrets.FTPPWD }}
FTPSERVER: ${{ secrets.FTPSERVER }}
run: |
bash .ci/ftp_deploy.sh $FTPUSER $FTPPWD $FTPSERVER doc/build/html nuclei_n100_sdk
- name: Upload Documentation
uses: actions/upload-artifact@v3
with:
# Artifact name
name: n100_sdk_doc
# A file, directory or wildcard pattern that describes what to upload
path: doc/build/html