snowwolf007cn editted the book #58
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
name: deploy-embedded-rust-arduino | |
run-name: ${{ github.actor }} editted the book | |
on: | |
push: | |
paths: | |
- '.github/workflows/deploy-embedded-rust-arduino.yml' | |
- 'src/**' | |
- 'book.toml' | |
jobs: | |
build: | |
name: build, test book | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # To push a branch | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install mdbook from crates.io | |
uses: baptiste0928/cargo-install@v3 | |
with: | |
crate: mdbook | |
- name: Install mdbook-image-size from crates.io | |
uses: baptiste0928/cargo-install@v3 | |
with: | |
crate: mdbook-image-size | |
- name: Build Book | |
run: | | |
mdbook build | |
- name: Setup Pages | |
uses: actions/configure-pages@v4 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
# Upload entire repository | |
path: 'book' | |
deploy: | |
name: deploy to pages | |
needs: build | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write # To push to a GitHub Pages site | |
id-token: write # To update the deployment status | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |