-
-
Notifications
You must be signed in to change notification settings - Fork 13
38 lines (34 loc) · 1.13 KB
/
generate_docs.yml
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
name: Generate the documentation
on:
push:
tags:
- 'v*.*.*'
- '!v*.*.*d'
jobs:
generate_docs:
name: Generate Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: mattnotmitt/doxygen-action@v1
with:
working-directory: './doxygen'
- name: gen doc
if: github.repository == 'bab2min/EigenRand'
run: |
export EIGENRAND_VER=${GITHUB_REF##*/}
mkdir -p ../g
pushd ../g
git clone https://${{ secrets.ACCESS_TOKEN }}@github.com/bab2min/bab2min.github.io
rm -rf bab2min.github.io/eigenrand/${EIGENRAND_VER}/en
mkdir -p bab2min.github.io/eigenrand/${EIGENRAND_VER}/en
popd
cp -r doxygen/docs/html/* ../g/bab2min.github.io/eigenrand/${EIGENRAND_VER}/en
pushd ../g/bab2min.github.io
echo "<meta http-equiv='refresh' content='0;url=/eigenrand/${EIGENRAND_VER}/en/index.html' >" > eigenrand/index.html
git config user.email "[email protected]"
git config user.name "bab2min"
git add .
git commit -m "EigenRand ${EIGENRAND_VER} en"
git push
popd