-
Notifications
You must be signed in to change notification settings - Fork 9
48 lines (44 loc) · 1.22 KB
/
schema-build.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
name: Schema deploy
on:
push:
branches: [master]
paths:
- "qendpoint-backend/**"
defaults:
run:
working-directory: qendpoint-backend
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'microsoft'
java-version: 17
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- name: Compile project
run: |
cd ..
mvn clean install -DskipTests
- name: Create schema file
run: mvn spring-boot:run -Pschema
- run: mkdir deploy
- run: mv COMPILER_SCHEMA.MD deploy
- name: Deploy to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: schema-pages
build_dir: qendpoint-backend/deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}