-
-
Notifications
You must be signed in to change notification settings - Fork 4
79 lines (66 loc) · 1.89 KB
/
github-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
name: Publish Docs
on:
workflow_dispatch:
schedule:
- cron: '0 0 1 * *'
push:
branches:
- 'main'
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Generate site
run: mvn --batch-mode --activate-profiles release --projects api,bundle install site
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Archive artifact
shell: sh
if: runner.os == 'Linux'
run: |
chmod -c -R +rX "$INPUT_PATH" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
tar \
--dereference --hard-dereference \
--directory "./api/target/gapidocs" \
-cvf "$RUNNER_TEMP/artifact.tar" \
.
tar \
--dereference --hard-dereference \
--directory "./bundle/target/gapidocs" \
-cvf "$RUNNER_TEMP/artifact.tar" \
.
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: github-pages
path: ${{ runner.temp }}/artifact.tar
retention-days: 90
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4