Skip to content

cargo-release config #7

cargo-release config

cargo-release config #7

Workflow file for this run

name: Book
on:
push:
branches:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
pull_request:
branches:
- main
paths:
- .github/workflows/book.yml
- book/**
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: beta
- uses: Swatinem/rust-cache@v2
- name: Install mdbook and mdbook-linkcheck
uses: taiki-e/install-action@v2
with:
tool: mdbook, mdbook-linkcheck
- name: Build mdbook
run: |
mdbook build book
- name: Archive book output
uses: actions/upload-artifact@v3
if: always()
with:
name: book
path: book/book
deploy:
if:
github.repository == 'sourcefrog/cargo-mutants' && github.ref_name ==
'main'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
concurrency: # Allow one concurrent deployment
group: "pages"
cancel-in-progress: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install mdbook
uses: taiki-e/install-action@v2
with:
tool: mdbook, mdbook-linkcheck
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Build book
run: |
mdbook build book
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: "book/book/html"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1