-
Notifications
You must be signed in to change notification settings - Fork 922
51 lines (43 loc) · 1.34 KB
/
publish-site.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
name: Publish Armeria site
on:
workflow_dispatch:
inputs:
version:
description: 'Release Version'
required: true
type: string
push:
tags:
- armeria-*
env:
LC_ALL: 'en_US.UTF-8'
jobs:
publish-site:
if: github.repository == 'line/armeria'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install svgbob_cli
run: |
sudo apt-get -y install cargo && cargo install svgbob_cli
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- id: setup-jdk-21
name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build the site
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
./gradlew --no-daemon --stacktrace --max-workers=2 --parallel -PgithubToken=${{ secrets.GITHUB_TOKEN }} -Pversion=${{ inputs.version }} site
else
./gradlew --no-daemon --stacktrace --max-workers=2 --parallel -PgithubToken=${{ secrets.GITHUB_TOKEN }} site
fi
- name: Deploy the site
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: site/public