Skip to content

Commit e6d5d2d

Browse files
authored
Merge pull request #2174 from Kobzol/static
Add rendering of the web into a directory
2 parents 8698e4d + 1086a0f commit e6d5d2d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1119
-3050
lines changed

.github/workflows/main.yml

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: CI
2-
on: [push, pull_request]
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
37
env:
48
RUST_BACKTRACE: 1
59
jobs:
@@ -12,8 +16,7 @@ jobs:
1216
with:
1317
components: rustfmt
1418

15-
- name: Formatting
16-
run: cargo fmt --all -- --check
19+
- uses: Swatinem/rust-cache@v2
1720

1821
- name: Test
1922
run: |
@@ -22,3 +25,33 @@ jobs:
2225
cargo build --all --locked
2326
cargo clippy -- --deny warnings
2427
cargo test --all --locked
28+
29+
- name: Formatting
30+
run: cargo fmt --all -- --check
31+
32+
- name: Build website
33+
run: cargo run
34+
env:
35+
BASE_URL: "/www.rust-lang.org"
36+
37+
- name: Configure GitHub Pages
38+
uses: actions/configure-pages@v5
39+
40+
- name: Upload website
41+
uses: actions/upload-pages-artifact@v3
42+
with:
43+
path: build
44+
45+
deploy:
46+
needs: [ build ]
47+
if: github.action == 'push' && github.ref == 'refs/heads/master'
48+
environment:
49+
name: github-pages
50+
permissions:
51+
contents: read
52+
pages: write
53+
id-token: write
54+
runs-on: ubuntu-latest
55+
steps:
56+
- name: Deploy to GitHub Pages
57+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.DS_Store
22
/target/
3+
/build/
34
**/*.rs.bk
45
/node_modules
56
/static/styles/*.map

0 commit comments

Comments
 (0)