-
Notifications
You must be signed in to change notification settings - Fork 18
65 lines (56 loc) · 1.91 KB
/
gh-pages.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
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: GitHub Pages
on:
push:
branches:
- 'master'
pull_request:
branches:
- 'master'
jobs:
docs:
name: "Deploy"
runs-on: ubuntu-latest
env:
working-directory: ./doc
steps:
- uses: actions/checkout@main
- name: Dependencies
run: |
sudo apt update
sudo apt install -y xsltproc doxygen doxygen-doc texlive ghostscript graphviz python3-wheel python3-setuptools
pip3 install --upgrade Jinja2
pip3 install --user mkdocs mkdocs-material mkdocs-video pymdown-extensions
pip3 install --upgrade pygments
echo "${HOME}/.local/bin" >> ${GITHUB_PATH}
- name: Configure Git
run: |
git config --global push.default upstream
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
- name: Get YARP XSL interpreter
run: |
cd ${GITHUB_WORKSPACE}
git clone --depth 1 --branch master https://github.com/robotology/yarp.git
echo "YARP_SOURCE_DIR=${GITHUB_WORKSPACE}/yarp" >> ${GITHUB_ENV}
- name: Build Doxygen
run: |
cd doxygen
./doc-compile.sh
working-directory: ${{ env.working-directory }}
- name: Build Mkdocs
run: |
cd mkdocs
./site-compile.sh
working-directory: ${{ env.working-directory }}
- name: Create and prepare gh-pages anew
run: |
git checkout --orphan gh-pages
rm -R `ls -A | grep -v -E "^(.git|doc)$"`
mv doc/mkdocs/site/* ./
- name: Commit and push
if: github.event_name == 'push'
run: |
git add .
git commit -m "Publish site"
git push --force --set-upstream origin gh-pages