-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (50 loc) · 1.35 KB
/
deploy-embedded-rust-arduino.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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