-
Notifications
You must be signed in to change notification settings - Fork 1
86 lines (86 loc) · 2.63 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: CI
on:
push:
#branches: [ master ]
pull_request:
#branches: [ master ]
workflow_dispatch:
inputs:
trigger:
description: Type m to triggre manual jobs
required: false
default: ''
jobs:
manual-job:
if: startsWith(github.event.inputs.trigger, 'm')
|| startsWith(github.event.inputs.trigger, 'M')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
id: java-cache
with:
path: |
~/.m2/repository
!~/.m2/repository/com/gituhb/daggerok
key: ${{ runner.os }}-${{ hashFiles('**/*.gradle.kts') }}
- uses: actions/setup-java@v1
with:
java-version: 11
- run: sudo rm -rf ~/.m2/repository/com/github/daggerok
#- name: Install Protoc
# uses: arduino/setup-protoc@v1
# with:
# version: '2.5.0'
# include-pre-releases: false
- run: ./gradlew dependencyUpdates -Drevision=release
tests:
if: github.event.inputs.trigger == ''
|| !startsWith(github.event.inputs.trigger, 'm')
|| !startsWith(github.event.inputs.trigger, 'M')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
id: java-cache
with:
path: |
./build
~/.m2/repository
!~/.m2/repository/com/gituhb/daggerok
key: ${{ runner.os }}-${{ hashFiles('**/*.gradle.kts') }}
- uses: actions/setup-java@v1
with:
java-version: 11
- run: sudo rm -rf ~/.m2/repository/com/github/daggerok
- run: ./gradlew dependencies
- run: ./gradlew clean build
docs:
if: github.event.inputs.trigger == ''
|| !startsWith(github.event.inputs.trigger, 'm')
|| !startsWith(github.event.inputs.trigger, 'M')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
id: java-cache
with:
path: |
~/.m2/repository
!~/.m2/repository/com/gituhb/daggerok
key: ${{ runner.os }}-${{ hashFiles('**/*.gradle.kts') }}
- uses: actions/cache@v2
id: npm-cache
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
- uses: actions/setup-java@v1
with:
java-version: 11
- run: cd docs ; npm i -E
- run: cd docs ; npm run gh-pages
- name: GitHub Pages 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.