Skip to content

Commit 52e7c14

Browse files
committed
Add GitHub workflow for deploying plugin site
1 parent 16cd7e2 commit 52e7c14

File tree

4 files changed

+59
-77
lines changed

4 files changed

+59
-77
lines changed

.github/workflows/maven.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ on:
99
pull_request:
1010
branches: [ master ]
1111

12+
permissions:
13+
contents: read # to fetch code (actions/checkout)
14+
1215
jobs:
1316
build:
14-
1517
runs-on: ubuntu-latest
1618

1719
steps:
@@ -22,5 +24,10 @@ jobs:
2224
java-version: '11'
2325
distribution: 'adopt'
2426
cache: maven
27+
2528
- name: Build with Maven
26-
run: mvn -B verify -P=integration-test
29+
run: mvn --batch-mode --no-transfer-progress verify -P=integration-test
30+
31+
# Always build plugin site (but don't publish), to make sure build works
32+
- name: Build plugin site
33+
run: mvn --batch-mode --no-transfer-progress site

.github/workflows/site.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Publish plugin site
2+
3+
on:
4+
release:
5+
types: [published]
6+
# Support manually triggering this workflow from GitHub UI
7+
workflow_dispatch:
8+
9+
jobs:
10+
build-site:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read # to fetch code (actions/checkout)
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Set up JDK 11
18+
uses: actions/setup-java@v4
19+
with:
20+
java-version: "11"
21+
distribution: "adopt"
22+
cache: maven
23+
24+
- name: Build site
25+
run: mvn --batch-mode --no-transfer-progress site
26+
27+
- name: Upload site files as artifact
28+
id: deployment
29+
uses: actions/upload-pages-artifact@v3
30+
with:
31+
path: target/site
32+
33+
# See https://github.com/actions/deploy-pages
34+
deploy-site:
35+
needs: build-site
36+
37+
permissions:
38+
pages: write
39+
id-token: write
40+
41+
# Deploy to the github-pages environment
42+
environment:
43+
name: github-pages
44+
url: ${{ steps.deployment.outputs.page_url }}
45+
46+
runs-on: ubuntu-latest
47+
steps:
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v4

.publish_site.sh

Lines changed: 0 additions & 41 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)