Skip to content

Commit 39e4f33

Browse files
committed
ci: Merge the two book workflows
1 parent 71d4ad0 commit 39e4f33

File tree

2 files changed

+42
-47
lines changed

2 files changed

+42
-47
lines changed

.github/workflows/book.yml

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
name: Build book
1+
name: Book
2+
23
on:
34
push:
45
branches:
@@ -32,3 +33,43 @@ jobs:
3233
with:
3334
name: book
3435
path: book/book
36+
37+
deploy:
38+
needs: build
39+
if: github.repository == 'sourcefrog/cargo-mutants' && github.ref == 'refs/head/main'
40+
41+
permissions:
42+
contents: read
43+
pages: write
44+
id-token: write
45+
46+
environment:
47+
name: github-pages
48+
url: ${{ steps.deployment.outputs.page_url }}
49+
concurrency: # Allow one concurrent deployment
50+
group: "pages"
51+
cancel-in-progress: true
52+
runs-on: ubuntu-latest
53+
steps:
54+
- uses: actions/checkout@v4
55+
with:
56+
fetch-depth: 0
57+
- name: Install mdbook
58+
uses: taiki-e/install-action@v2
59+
with:
60+
tool: mdbook
61+
- name: Install mdbook-linkcheck
62+
# Temporarily pull the fix for https://github.com/Michael-F-Bryan/mdbook-linkcheck/pull/98
63+
run: cargo install mdbook-linkcheck --git https://github.com/schilkp/mdbook-linkcheck --branch mdbook_v0.5
64+
- name: Setup Pages
65+
uses: actions/configure-pages@v5
66+
- name: Build book
67+
run: |
68+
mdbook build book
69+
- name: Upload artifact
70+
uses: actions/upload-pages-artifact@v3
71+
with:
72+
path: "book/book/html"
73+
- name: Deploy to GitHub Pages
74+
id: deployment
75+
uses: actions/deploy-pages@v4

.github/workflows/release-book.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)