-
Notifications
You must be signed in to change notification settings - Fork 47
70 lines (60 loc) · 2.13 KB
/
deploy_docs.yml
File metadata and controls
70 lines (60 loc) · 2.13 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
name: Generate and deploy docs
on:
push:
branches:
- main
env:
DOXYGEN_VERSION: '1.13.2'
DOXYFILE_PATH: ./kactus2dev/Administrative/docs/Doxyfile
jobs:
generate-docs:
runs-on: ubuntu-latest
steps:
- name: Set up Doxygen
run: |
echo $(pwd)
sudo apt install -y wget
wget -nv https://www.doxygen.nl/files/doxygen-$DOXYGEN_VERSION.linux.bin.tar.gz
tar -xzf doxygen-$DOXYGEN_VERSION.linux.bin.tar.gz
echo "$(pwd)/doxygen-$DOXYGEN_VERSION/bin" >> $GITHUB_PATH
- name: Checkout kactus2 repository
uses: actions/checkout@v4
with:
repository: kactus2/kactus2dev
token: ${{ secrets.GITHUB_TOKEN }}
path: kactus2dev
- name: Generate Doxygen documentation
run: doxygen $DOXYFILE_PATH
- name: Checkout target repo
uses: actions/checkout@v4
with:
repository: kactus2/kactus2.github.io
token: ${{ secrets.PAGES_REPO_PAT }}
path: kactus2.github.io
- name: Copy documentation to target repository
run: |
cd kactus2.github.io
git rm -rf .
git clean -fxd
touch .nojekyll
cd ..
mkdir kactus2.github.io/reference-guide
cp -r docs/html/* kactus2.github.io/reference-guide
cp kactus2dev/Administrative/docs/index.html kactus2.github.io
- name: Commit and push changes
run: |
cd kactus2.github.io
echo "Checking for changes..."
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
if git diff --cached --quiet; then
echo "No changes detected, aborting push"
else
echo "Changes detected, proceeding with commit and push."
git commit -m 'Update Doxygen documentation'
git push
fi
shell: bash
# - name: Publish pages
# uses: actions/github-pages