-
Notifications
You must be signed in to change notification settings - Fork 196
56 lines (51 loc) · 1.49 KB
/
documentation.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
name: Documentation
on:
push:
branches: [ master ]
tags:
- 'v*'
pull_request:
branches: [ master ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
run_docs:
runs-on: "ubuntu-22.04"
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch tags
run: git fetch --tags --force
- name: Install Java 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
- name: Set environment variables (Development)
run: |
echo "BRANCH=development" >> $GITHUB_ENV
# if: github.ref == 'refs/heads/master'
- name: Set environment variables (Tag)
run: |
echo "BRANCH=beta" >> $GITHUB_ENV
if: startsWith(github.ref, 'refs/tags/v')
- name: Set environment variables (Release)
run: |
echo "BRANCH=release" >> $GITHUB_ENV
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, 'alpha') && !contains(github.ref, 'beta')
- name: Gradle Build
run: |
chmod +x gradlew
./gradlew docs:generateJavaDocs docs:doxygen
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
ssh-key: ${{ secrets.DOCS_DEPLOY_KEY }}
repository-name: photonvision/photonvision.github.io
branch: photonvision-${{ env.BRANCH }}
clean: true
single-commit: true
folder: docs/build/docs