Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 36 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: CI
on: [push, pull_request]
on:
push:
branches:
- master
pull_request:
env:
RUST_BACKTRACE: 1
jobs:
Expand All @@ -12,8 +16,7 @@ jobs:
with:
components: rustfmt

- name: Formatting
run: cargo fmt --all -- --check
- uses: Swatinem/rust-cache@v2

- name: Test
run: |
Expand All @@ -22,3 +25,33 @@ jobs:
cargo build --all --locked
cargo clippy -- --deny warnings
cargo test --all --locked

- name: Formatting
run: cargo fmt --all -- --check

- name: Build website
run: cargo run
env:
BASE_URL: "/www.rust-lang.org"

- name: Configure GitHub Pages
uses: actions/configure-pages@v5

- name: Upload website
uses: actions/upload-pages-artifact@v3
with:
path: build

deploy:
needs: [ build ]
if: github.action == 'push' && github.ref == 'refs/heads/master'
environment:
name: github-pages
permissions:
contents: read
pages: write
id-token: write
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.DS_Store
/target/
/build/
**/*.rs.bk
/node_modules
/static/styles/*.map
Expand Down
Loading
Loading