-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (47 loc) · 1.72 KB
/
main.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
name: Build Updatesite
on:
push:
branches: [main]
release:
types: [created]
pull_request:
workflow_dispatch:
schedule:
- cron: '30 2 * * *' # run nightly at 2:30 am
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml', '**/MANIFEST.MF') }}
restore-keys: ${{ runner.os }}-m2
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Build and Verify
run: mvn clean verify
- name: Publish Nightly Update Site
if: github.event_name != 'release' && github.ref == 'refs/heads/main' && github.repository_owner == 'DataFlowAnalysis'
uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.UPDATE_SITE_DEPLOY_KEY }}
external_repository: DataFlowAnalysis/updatesite
destination_dir: nightly/converter/
publish_dir: releng/org.dataflowanalysis.converter.updatesite/target/repository
publish_branch: main
- name: Publish Release Update Site
if: github.event_name == 'release' && github.repository_owner == 'DataFlowAnalysis'
uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.UPDATE_SITE_DEPLOY_KEY }}
external_repository: DataFlowAnalysis/updatesite
destination_dir: release/converter/${{ github.event.release.tag_name }}
publish_dir: releng/org.dataflowanalysis.converter.updatesite/target/repository
publish_branch: main