forked from build-trust/ockam
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (65 loc) · 1.87 KB
/
Copy pathdocumentation.yml
File metadata and controls
73 lines (65 loc) · 1.87 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Documentation
permissions:
contents: read
defaults:
run:
shell: bash
on:
workflow_dispatch:
pull_request:
paths:
- '.github/workflows/documentation.yml'
- 'documentation/use-cases/**.md'
- 'documentation/guides/rust/**.md'
- 'tools/docs/**'
- '**.rs'
- '**.toml'
- '**/Cargo.lock'
- '**.gradle'
- 'tools/gradle/**'
- 'gradlew'
- 'gradlew.bat'
- '.github/actions/**'
push:
paths:
- '.github/workflows/documentation.yml'
- 'documentation/use-cases/**.md'
- 'documentation/guides/rust/**.md'
- 'tools/docs/**'
- '**.rs'
- '**.toml'
- '**/Cargo.lock'
- '**.gradle'
- 'tools/gradle/**'
- 'gradlew'
- 'gradlew.bat'
- '.github/actions/**'
branches:
- develop
schedule:
- cron: '0 1 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true
jobs:
check_examples_in_guides:
name: Documentation - Check Examples
runs-on: ubuntu-20.04
container:
image: ghcr.io/build-trust/ockam-builder@sha256:26c5bba9deca18953043a3a2368ec6bb00035676965432f35be24f88e316363a
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
- uses: ./.github/actions/gradle_cache
- uses: ./.github/actions/cargo_home_cache
- uses: ./.github/actions/cargo_target_dir_cache
- name: Check that example source and guide code blocks match
id: cache
run: |
set -ex
OCKAM_HOME=$PWD bash -ex tools/docs/check_documentation.sh
# Only cache rust build if example blocks code was built
if ls target; then
echo "is_cached=true" >> $GITHUB_OUTPUT
fi
- uses: ./.github/actions/cargo_target_dir_pre_cache
if: steps.cache.outputs.is_cached