-
Notifications
You must be signed in to change notification settings - Fork 1
72 lines (69 loc) · 2.35 KB
/
maven.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI with Maven
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
name: Build and Test
steps:
- name: Checkout git repository
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Test and package with Maven
uses: GabrielBB/xvfb-action@v1
with:
run: mvn -B verify
- name: Upload failure logs if necessary
uses: actions/upload-artifact@v3
if: failure()
with:
name: failure-logs-${{ github.sha }}
path: tests/**/.log
retention-days: 3
- name: Upload updatesite artifact
uses: actions/upload-artifact@v3
with:
name: updatesite-${{ github.sha }}
path: releng/net.maisikoleni.eclipse.extensions.updatesite/target/repository/
retention-days: 7
publish:
runs-on: ubuntu-latest
name: Deploy to GitHub Pages
environment: github-pages
needs: build
steps:
- name: Download updatesite artifact into ./public
uses: actions/download-artifact@v2
with:
name: updatesite-${{ github.sha }}
path: public/repository/latest
- name: Checkout into ./main
uses: actions/checkout@v2
with:
path: main
- name: Extract commit date
id: commit_date
run: |
cd main
echo ::set-output name=value::$(git show -s --format=%ci ${{ github.sha }})
cd ..
- name: Process AsciiDoc from ./main to ./public
uses: avattathil/asciidoctor-action@v2
with:
program: asciidoctor -D public -b html5 -o index.html -a toc=left -a revdate="${{ steps.commit_date.outputs.value }}" -a revnumber=${{ github.sha }} -a source-highlighter=rouge main/README.adoc
- name: Push content of ./public
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: public
cname: extensions.eclipse.maisikoleni.net