-
Notifications
You must be signed in to change notification settings - Fork 2
36 lines (35 loc) · 1.24 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
name: Gradle Deployment
on:
push:
branches:
- "main"
tags:
- "**"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Set up JDK 21
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
distribution: 'temurin'
java-version: '21'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@db19848a5fa7950289d3668fb053140cf3028d43 # v3.3.2
- 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