-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (65 loc) · 1.94 KB
/
ci.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
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
62
63
64
65
name: CI
on:
push:
#pull_request:
workflow_dispatch:
inputs:
trigger:
description: Type m to triggre manual jobs
required: false
default: ''
env:
NODE_VERSION: 14
JAVA_VERSION: 1.8
jobs:
tests:
name: tests
if: github.event.inputs.trigger == ''
|| !startsWith(github.event.inputs.trigger, 'm')
|| !startsWith(github.event.inputs.trigger, 'M')
#if: startsWith(github.event.inputs.trigger, 'm')
# || startsWith(github.event.inputs.trigger, 'M')
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
id: global-cache
with:
path: |
~/.m2
!~/.m2/repository/example*
key: ${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
- uses: actions/setup-java@v1
with:
java-version: ${{ env.JAVA_VERSION }}
- run: sudo rm -rf ~/.m2/repository/example*
- run: ./mvnw clean package
docs:
name: github pages
if: github.event.inputs.trigger == ''
|| !startsWith(github.event.inputs.trigger, 'm')
|| !startsWith(github.event.inputs.trigger, 'M')
#if: startsWith(github.event.inputs.trigger, 'm')
# || startsWith(github.event.inputs.trigger, 'M')
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
id: global-cache
with:
path: |
~/.n*
~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package.json', '**/package-lock.json') }}
- uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
- run: npm i -C docs
- run: npm run build-github-pages -C docs
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.1.0
with:
branch: gh-pages # The branch the action should deploy to.
folder: docs/.vuepress/dist # The folder the action should deploy.