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 11name : CI
2- on : [push, pull_request]
2+ on : [ push, pull_request ]
33env :
44 RUST_BACKTRACE : 1
55jobs :
1212 with :
1313 components : rustfmt
1414
15- - name : Formatting
16- run : cargo fmt --all -- --check
15+ - uses : Swatinem/rust-cache@v2
1716
1817 - name : Test
1918 run : |
2221 cargo build --all --locked
2322 cargo clippy -- --deny warnings
2423 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