forked from rust-lang/project-stable-mir
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
52 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,34 @@ | ||
name: Deploy Book | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
ci: | ||
name: CI | ||
build-book: | ||
name: Build Book | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: XAMPPRocky/deploy-mdbook@v1 | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install mdbook | ||
run: cargo install mdbook --version "^0.4" --locked | ||
|
||
- name: Run mdbook | ||
run: mdbook build | ||
|
||
- name: Upload book | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: book/ | ||
retention-days: "3" | ||
|
||
- name: Deploy Book | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
if: ${{ github.event_name == 'push' && startsWith('refs/heads/main', github.ref) }} | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: gh-pages | ||
folder: book/ | ||
single-commit: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Run a job to ensure formatting is OK | ||
name: Format Check | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
format-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run Rust Format | ||
run: cargo fmt --check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters