File tree 2 files changed +37
-31
lines changed
2 files changed +37
-31
lines changed Original file line number Diff line number Diff line change 1
- name : Rust CI with deploy on master
1
+ name : Basic Rust CI with checks
2
2
3
3
on :
4
4
push :
10
10
build :
11
11
name : Build project
12
12
runs-on : self-hosted
13
+ if : github.ref != 'refs/heads/master'
13
14
14
15
steps :
15
16
- uses : actions/checkout@v2
24
25
25
26
- name : Build release
26
27
run : cargo build --release
27
-
28
- - name : Build documentation
29
- run : cargo doc --no-deps
30
-
31
- - name : Upload compiled files
32
- uses : actions/upload-artifact@v2
33
- with :
34
- name : kafka-json-processor-target
35
- path : ' target/**/*'
36
-
37
- deploy_doc :
38
- name : Deploy documentation
39
- runs-on : ubuntu-latest
40
- needs : [ build ]
41
- if : github.ref == 'refs/heads/master'
42
-
43
- steps :
44
- - uses : actions/checkout@v2
45
-
46
- - name : Download compiled files
47
- uses : actions/download-artifact@v2
48
- with :
49
- name : kafka-json-processor-target
50
- path : target
51
-
52
- - name : Deploy to GitHub Pages
53
- uses : JamesIves/github-pages-deploy-action@v4
54
- with :
55
- branch : gh-pages
56
- folder : ' target/doc'
Original file line number Diff line number Diff line change
1
+ name : Rust CI with deploy on master
2
+
3
+ on :
4
+ push :
5
+ branches : [ 'master' ]
6
+ pull_request :
7
+ branches : []
8
+
9
+ jobs :
10
+ build :
11
+ name : Build project
12
+ runs-on : self-hosted
13
+
14
+ steps :
15
+ - uses : actions/checkout@v2
16
+
17
+ - name : Install latest rust toolchain
18
+ uses : actions-rust-lang/setup-rust-toolchain@v1
19
+ with :
20
+ toolchain : stable
21
+
22
+ - name : Test
23
+ run : cargo clippy -- -Dwarnings && cargo test
24
+
25
+ - name : Build release
26
+ run : cargo build --release
27
+
28
+ - name : Build documentation
29
+ run : cargo doc --no-deps
30
+
31
+ - name : Deploy to GitHub Pages
32
+ uses : JamesIves/github-pages-deploy-action@v4
33
+ with :
34
+ branch : gh-pages
35
+ folder : ' target/doc'
You can’t perform that action at this time.
0 commit comments