-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (46 loc) · 1.31 KB
/
docs.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
52
53
54
name: Docs
on:
workflow_call:
workflow_dispatch:
defaults:
run:
shell: bash -euo pipefail {0}
jobs:
docs:
name: Docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install mise
run: |
curl https://mise.jdx.dev/install.sh | sh
echo "$HOME/.local/share/mise/bin" >> $GITHUB_PATH
echo "$HOME/.local/share/mise/shims" >> $GITHUB_PATH
- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install yadayada if not cached
run: |
if ! command -v yadayada > /dev/null; then
cargo install --features yadayada --path .
fi
- name: Run docs stamp
run: |
mise reshim
ya -c .config/ya/docs.yml stamp
- name: "Docs check"
run: |
if [[ -n $(git status --porcelain) ]]; then
echo "Documentation is out of date. Please run 'ya -c .config/ya/docs.yml stamp' and commit the changes."
git status
git diff
exit 1
fi