-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 changed file
with
43 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Check | ||
|
||
"on": | ||
workflow_dispatch: {} | ||
push: | ||
branches: ["master"] | ||
|
||
jobs: | ||
Build: | ||
runs-on: ubuntu-latest | ||
|
||
# Ask for a token with the right permissions to publish. It would be slightly | ||
# safer to split into two jobs, so the untrusted mdBook binary does not have | ||
# access to the token, but the worst you can do is deface the webpage which | ||
# a malicious mdBook could do anyway, so we keep the workflow simple. | ||
permissions: | ||
pages: write | ||
id-token: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install mdBook | ||
run: | | ||
curl -sSL "https://github.com/rust-lang/mdBook/releases/download/$(cat mdbook-version)/mdbook-$(cat mdbook-version)-x86_64-unknown-linux-gnu.tar.gz" | tar -xz | ||
- name: Build and test the book | ||
run: | | ||
./mdbook build | ||
./mdbook test | ||
# TODO: Is it needed? | ||
#- name: Configure Pages | ||
# uses: actions/configure-pages@v4 | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3.0.1 | ||
with: | ||
path: "book" | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4.0.5 |