This repository was archived by the owner on Oct 7, 2025. It is now read-only.
Build Updatesite #418
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Updatesite | |
on: | |
push: | |
branches: [main] | |
release: | |
types: [created] | |
pull_request: | |
workflow_dispatch: | |
schedule: | |
- cron: '45 1 * * *' # run nightly at 1: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: Setup Maven | |
uses: stCarolas/setup-maven@v5 | |
with: | |
maven-version: 3.9.6 | |
- name: Build and Verify | |
run: mvn clean verify | |
- name: Check formatting | |
run: mvn spotless:check | |
- 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/examplemodels/ | |
publish_dir: releng/org.dataflowanalysis.examplemodels.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/examplemodels/${{ github.event.release.tag_name }} | |
publish_dir: releng/org.dataflowanalysis.examplemodels.updatesite/target/repository | |
publish_branch: main | |