-
Notifications
You must be signed in to change notification settings - Fork 1.1k
65 lines (65 loc) · 2.16 KB
/
gh-pages.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
62
63
64
65
name: Publish Documentation
on:
workflow_dispatch:
pull_request:
branches: [ develop ]
paths:
- '.github/workflows/gh-pages.yaml'
- 'CMSIS/Utilities/check_links.sh'
- 'CMSIS/DoxyGen/**'
push:
branches: [ develop ]
paths:
- '.github/workflows/gh-pages.yaml'
- 'CMSIS/Utilities/check_links.sh'
- 'CMSIS/DoxyGen/**'
jobs:
docs:
name: Build develop documentation
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- name: Install Doxygen 1.8.6
run: |
wget http://archive.ubuntu.com/ubuntu/pool/main/d/doxygen/doxygen_1.8.6-2_amd64.deb
sudo dpkg -i doxygen_1.8.6-2_amd64.deb
- name: Install mscgen 0.20
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y mscgen=0.20-12
- name: Install linkchecker
run: |
sudo pip install LinkChecker
- name: Generate doxygen
run: CMSIS/DoxyGen/gen_doc.sh
- name: Run linkchecker
run: |
echo "::add-matcher::.github/linkchecker.json"
CMSIS/Utilities/check_links.sh CMSIS/Documentation/index.html
- name: Upload documentation
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v2
with:
path: CMSIS/Documentation/**
- name: Archive documentation
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
run: |
cd CMSIS/Documentation
tar -cvjf /tmp/doc.tbz2 .
- uses: actions/checkout@v2
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
with:
ref: gh-pages
- name: Publish documentation
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
run: |
rm -r develop
mkdir develop
cd develop
tar -xvjf /tmp/doc.tbz2
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit -m "Update develop documentation"
git push