Skip to content

Generate And Deploy #3615

Generate And Deploy

Generate And Deploy #3615

Workflow file for this run

name: Generate And Deploy
on:
push:
branches: [main]
pull_request:
release:
types: [created]
workflow_dispatch:
jobs:
aggregation:
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: Adapt nightly.aggr [Release]
if: github.event_name == 'release'
run: |
sed -r -i "s#https://vitruv-tools.github.io/updatesite/nightly/(.*)\"#https://vitruv-tools.github.io/updatesite/release/\1/${{ github.event.release.tag_name }}\"#g" nightly.aggr
sed -i "s/Vitruv Nightly Update Site/Vitruv Release Update Site/g" nightly.aggr
- name: Generate aggregated updatesite
run: >
./mvnw -B -U clean package
-Dstyle.color=always
-Dorg.slf4j.simpleLogger.log.org.eclipse.tycho.core.resolver.DefaultTychoResolver=warn
-Dorg.slf4j.simpleLogger.log.org.eclipse.tycho.osgi.configuration.MavenContextConfigurator=warn
-Dorg.slf4j.simpleLogger.log.org.eclipse.sisu.equinox.launching.internal.DefaultEquinoxLauncher=warn
-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog
env:
MAVEN_OPTS: -Djansi.force=true
- name: Publish Nightly Update Site
if: github.event_name != 'release' && github.ref == 'refs/heads/main' && github.repository_owner == 'vitruv-tools'
uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.UPDATE_SITE_DEPLOY_KEY }}
external_repository: vitruv-tools/updatesite
destination_dir: nightly/aggregated
publish_dir: target/final
publish_branch: main
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
- name: Publish Release Update Site
if: github.event_name == 'release' && github.repository_owner == 'vitruv-tools'
uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.UPDATE_SITE_DEPLOY_KEY }}
external_repository: vitruv-tools/updatesite
destination_dir: release/aggregated/${{ github.event.release.tag_name }}
publish_dir: target/final
publish_branch: main
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'