-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (88 loc) · 2.52 KB
/
main.yml
File metadata and controls
90 lines (88 loc) · 2.52 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
78
79
80
81
82
83
84
85
86
87
88
89
name: Auto-doc (ascend-nasa-asu)
run-name: Auto-doc is formatting and documenting code
on:
push:
branches:
- main
jobs:
format:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: ./scripts
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.BOT_AUTH }}
fetch-depth: 0
- name: Install clang-format
run: |
sudo apt-get update
sudo apt-get install clang-format
- name: Checkout branch
run: |
git checkout main
git pull
git status
- name: Run formatting script
run:
bash standardizeFormat.sh
- name: Push formatting changes to repo
run: |
git config user.name "autoformatter[bot]"
git config user.email "autoformatter[bot]@users.noreply.github.com"
git status
if [ "$(git diff)" = "" ]; then
echo "No formatting needed"
else
git add ..
git commit -m "[bot] - autoformatted code"
git push
fi
# - name: Checkout docs
# uses: actions/checkout@v4
# with:
# token: ${{ secrets.BOT_AUTH }}
# ref: docs
- name: Checkout docs branch
run: |
git checkout docs
git pull
git status
- name: Merge main into docs with theirs strategy
run: |
git fetch origin main
git branch -v
git merge -X theirs main
- name: Install Doxygen and Graphviz
run: |
sudo apt-get install doxygen
sudo apt install graphviz
- name: Clean old docs
run:
rm -rf ../docs/*
- name: Run doxygen on ascendfsw
run:
doxygen fswDoxyfile
- name: Move docs_src to /docs/
run: |
mkdir -p ../docs/images/
cp ../docs_src/images/* ../docs/images/
# - name: Pull everything out of html folder
# run: |
# mv ../docs/html/* ../docs/
# rmdir ../docs/html
- name: Push documentation changes to repo
run: |
git config user.name "autodoc[bot]"
git config user.email "autodoc[bot]@users.noreply.github.com"
git status
if [ "$(git diff)" = "" ]; then
echo "No Documentation changes"
else
git add ..
git commit -m "[bot] - generated doxygen docs"
git push
fi