-
Notifications
You must be signed in to change notification settings - Fork 21
44 lines (35 loc) · 970 Bytes
/
docs.yaml
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
name: docs
on: [workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
ref: gh-pages
path: gh-pages
- uses: extractions/setup-crate@v1
with:
owner: rust-lang
name: mdBook
- uses: extractions/setup-crate@v1
with:
owner: Michael-F-Bryan
name: mdbook-linkcheck
- name: Build
run: |
mdbook build docs
cp -R docs/book/html/* gh-pages/
- name: Calculate Git short SHA
id: git
run: echo "::set-output name=short_sha::$(git rev-parse --short HEAD)"
- name: Git commit
run: |
cd gh-pages
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "publish docs for ${{ steps.git.outputs.short_sha }}"
git push
cd -