-
Notifications
You must be signed in to change notification settings - Fork 18
78 lines (67 loc) · 2.36 KB
/
doc.yaml
File metadata and controls
78 lines (67 loc) · 2.36 KB
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
# Build documentation and deploy to gh-pages
name: Documentation
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches-ignore: [ gh-pages ]
paths-ignore:
- README.md
- LICENSE
- .gitlab-ci.yml
- .gitignore
pull_request:
branches: [ master ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
name: build documentation
runs-on: ubuntu-22.04
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Source Code
uses: actions/checkout@v4
with:
submodules: recursive
# Install dependencies
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y lib32z1 dos2unix doxygen python3 python3-pip latexmk lftp \
texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
sudo pip3 install --upgrade pip
sudo pip3 install -r NMSIS/doc/requirements.txt
# Build NMSIS Documentation
- name: Build NMSIS Documentation
run: |
cd NMSIS/doc
make all
make latexpdf
cp build/latex/*.pdf build/html/
make clean_xml
# Update generated doc attachments
- name: Upload generated document
uses: actions/upload-artifact@v4
with:
name: nmsis-doc-${{ github.sha }}
path: |
NMSIS/doc/build/html
- name: Deploy documentation to gh-pages
uses: JamesIves/github-pages-deploy-action@v4
if: ${{ github.ref == 'refs/heads/master' }}
with:
branch: gh-pages
folder: NMSIS/doc/build/html
- name: Deploy Website
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/master' }}
env:
FTPUSER: ${{ secrets.FTPUSER }}
FTPPWD: ${{ secrets.FTPPWD }}
FTPSERVER: ${{ secrets.FTPSERVER }}
run: |
bash .ci/ftp_deploy.sh $FTPUSER $FTPPWD $FTPSERVER NMSIS/doc/build/html nmsis