File tree Expand file tree Collapse file tree 1 file changed +32
-3
lines changed Expand file tree Collapse file tree 1 file changed +32
-3
lines changed Original file line number Diff line number Diff line change 1
1
name : CI
2
- on : [push, pull_request]
2
+ on : [ push, pull_request ]
3
3
env :
4
4
RUST_BACKTRACE : 1
5
5
jobs :
12
12
with :
13
13
components : rustfmt
14
14
15
- - name : Formatting
16
- run : cargo fmt --all -- --check
15
+ - uses : Swatinem/rust-cache@v2
17
16
18
17
- name : Test
19
18
run : |
22
21
cargo build --all --locked
23
22
cargo clippy -- --deny warnings
24
23
cargo test --all --locked
24
+
25
+ - name : Formatting
26
+ run : cargo fmt --all -- --check
27
+
28
+ - name : Build website
29
+ run : cargo run
30
+ env :
31
+ BASE_URL : " /www.rust-lang.org"
32
+
33
+ - name : Configure GitHub Pages
34
+ uses : actions/configure-pages@v5
35
+
36
+ - name : Upload website
37
+ uses : actions/upload-pages-artifact@v3
38
+ with :
39
+ path : html
40
+
41
+ deploy :
42
+ needs : [ build ]
43
+ if : github.ref == 'refs/heads/master'
44
+ environment :
45
+ name : github-pages
46
+ permissions :
47
+ contents : read
48
+ pages : write
49
+ id-token : write
50
+ runs-on : ubuntu-latest
51
+ steps :
52
+ - name : Deploy to GitHub Pages
53
+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments