-
Notifications
You must be signed in to change notification settings - Fork 178
32 lines (29 loc) · 964 Bytes
/
gen.yaml
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
name: Generate Site
on:
push:
pull_request:
workflow_dispatch:
jobs:
generate:
if: github.repository_owner == 'marchof'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- run: |
mvn --no-transfer-progress package exec:java -Dexec.mainClass=org.javabubble.generator.SiteGenerator
working-directory: generator
# Publish to AWS Bucket
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-central-1
if: github.ref == 'refs/heads/main'
- run: |
aws s3 sync generator/target/site s3://javabubble.org
aws cloudfront create-invalidation --distribution-id EH2BVKQRF4MDG --paths "/*"
if: github.ref == 'refs/heads/main'