-
Notifications
You must be signed in to change notification settings - Fork 9
61 lines (55 loc) · 1.85 KB
/
deploy-blog.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
## This is basic continuous integration build for your Quarkus application.
name: Quarkus Roq Deploy Blog CI
on:
push:
branches: [ main ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'
- name: Build Roq
run: mvn -B clean install -DskipTests
- name: Build & Generate Blog
working-directory: blog
run: QUARKUS_ROQ_GENERATOR_BATCH=true mvn -B package quarkus:run -Dquarkus.profile=gh-pages -DskipTests
- name: Upload site as artifact
uses: actions/upload-artifact@v4
with:
name: site
path: blog/target/roq
retention-days: 1
deploy:
# Only try and deploy on merged code
if: "github.repository == 'quarkiverse/quarkus-roq' && github.ref_name == 'main' && (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')"
runs-on: ubuntu-latest
needs: build
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Download Built site
uses: actions/download-artifact@v4
with:
name: site
path: _site
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4