-
Notifications
You must be signed in to change notification settings - Fork 47
89 lines (75 loc) · 2 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
permissions:
contents: read
pages: write
id-token: write
name: GitHub Pages
on:
pull_request:
push:
workflow_dispatch:
inputs:
perform_step:
type: boolean
description: 'Publish GH Page'
default: false
jobs:
build-artifacts:
uses: ./.github/workflows/build-artifacts.yml
with:
# SonarQube requires JDK 17 or higher
java-version: '17'
pages:
needs: build-artifacts
runs-on: ubuntu-latest
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
env:
DTC_HEADLESS: true
steps:
- name: Install dot (Graphviz)
run: |
sudo apt-get update
sudo apt-get install -y graphviz
- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: "${{ runner.os }}-gradle-caches }}"
restore-keys: ${{ runner.os }}-gradle-caches
- name: Cache .doctoolchain
uses: actions/cache@v2
with:
path: ~/.doctoolchain
key: "${{ runner.os }}-doctoolchain }}"
restore-keys: ${{ runner.os }}-doctoolchain
- name: Check out
uses: actions/checkout@v2
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: build-artifacts
path: .
- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@v4
- name: Generate Pages
run: ./generate-pages
- name: Upload Artifacts
uses: actions/upload-pages-artifact@v3
with:
name: github-pages
path: public
retention-days: 7
publish:
runs-on: ubuntu-latest
needs: pages
if: ${{ github.event.inputs.perform_step }}
steps:
- name: Deploy Pages
uses: actions/deploy-pages@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}