-
Notifications
You must be signed in to change notification settings - Fork 6
63 lines (56 loc) · 1.79 KB
/
publish-update-site.yaml
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
name: Publish update-site
on:
workflow_dispatch:
push:
branches:
- master
- develop
paths:
- 'viewer/**'
- 'templates/eclipse_project/**'
- '.github/workflows/publish-update-site.yaml'
jobs:
publish:
name: Publish update-site to GitHub Pages
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'liberica'
java-package: jdk+fx # нужен FX
architecture: x64
cache: 'maven'
- name: Get latest GitHub Pages
run: |
wget https://github.com/${{ github.repository }}/archive/gh-pages.zip
unzip gh-pages.zip
mkdir public -p
cp -R ${GITHUB_REPOSITORY#*/}-gh-pages/. public
- name: Build master update site
if: github.ref == 'refs/heads/master'
run: |
export publication_location=../../../public/repository
export MAVEN_OPTS=
./gradlew download-lombok-plugin
export MAVEN_OPTS=-javaagent:target/lombok.jar=ECJ
./gradlew publishPlugin
- name: Build develop update site
if: github.ref == 'refs/heads/develop'
run: |
export publication_location=../../../public/dev/repository
export site_label_suffix='DEV. '
export MAVEN_OPTS=
./gradlew download-lombok-plugin
export MAVEN_OPTS=-javaagent:target/lombok.jar=ECJ
./gradlew publishPlugin
- name: Deploy
uses: peaceiris/[email protected]
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_branch: gh-pages
publish_dir: ./public
enable_jekyll: true