-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (38 loc) · 1.31 KB
/
deployment.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
name: Gradle Deployment
on:
push:
branches:
- "main"
tags:
- "**"
concurrency:
group: box-deployment
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up JDK 21
uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88 # v4.3.0
with:
distribution: 'temurin'
java-version: '21'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0
- run: chmod +x ./gradlew
- name: Publish artifacts
run: ./gradlew publish -P box.release=${{ startsWith(github.ref, 'refs/tags/') }}
- name: Generate Javadocs
run: ./gradlew aggregateJavadoc -P box.release=${{ startsWith(github.ref, 'refs/tags/') }}
- name: Create top and not-found pages
run: |
cp -f assets/gh-pages.html staging/index.html
cp -f assets/gh-pages.html staging/404.html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./staging
keep_files: true
allow_empty_commit: true