-
Notifications
You must be signed in to change notification settings - Fork 5
54 lines (44 loc) · 1.54 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
name: GitHub Pages
on:
push:
branches:
- 'master'
jobs:
docs:
name: "Deploy"
runs-on: ubuntu-latest
steps:
- name: Dependencies
run: |
sudo apt update
sudo apt install -y xsltproc doxygen doxygen-doc texlive ghostscript graphviz
- name: Check remote
run: git ls-remote --heads --exit-code https://github.com/${{ github.repository }}.git gh-pages
- 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"
- 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: Clone and rebase
run: |
cd ${GITHUB_WORKSPACE}
git clone https://github.com/${{ github.repository }}.git gh-pages
cd gh-pages
git checkout gh-pages
git rebase master
- name: Build Doxygen
run: |
cd ${GITHUB_WORKSPACE}/gh-pages/doxygen
./doc-compile.sh
- name: Commit and push
run: |
cd ${GITHUB_WORKSPACE}/gh-pages
git add .
git commit --amend --no-edit
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
git push --force-with-lease